/// Append the `HeaderValue` to the existing list of headers.
///
/// While this can be called multiple times, *most* headers should only
/// call this once. The exceptions are outliers like `Set-Cookie`.
Append the `HeaderValue` to the existing list of headers.
While this can be called multiple times, *most* headers should only
call this once. The exceptions are outliers like `Set-Cookie`.
Append the ` HeaderValue ` to the existing list of headers . While this can be called multiple times * most * headers should only call this once . The exceptions are outliers like ` Set - Cookie ` .
pub fn append(&mut self, value: HeaderValue) {
        let entry = match ::std::mem::replace(&mut self.state, State::Tmp) {
            State::First(http::header::Entry::Occupied(mut e)) => {
                e.insert(value);
                e
            },
            State::First(http::header::Entry::Vacant(e)) => e.insert_entry(value),
            State::Latter(mut e) => {
                e.append(value);
                e
            },
            State::Tmp => unreachable!("ToValues State::Tmp"),
        };
        self.state = State::Latter(entry);
    }
pub fn append ( & mut self , value : HeaderValue ) { let entry = match :: std :: mem :: replace ( & mut self . state , State :: Tmp ) { State :: First ( http :: header :: Entry :: Occupied ( mut e ) ) => { e . insert ( value ) ; e } , State :: First ( http :: header :: Entry :: Vacant ( e ) ) => e . insert_entry ( value ) , State :: Latter ( mut e ) => { e . append ( value ) ; e } , State :: Tmp => unreachable ! ( " " ) , } ; self . state = State :: Latter ( entry ) ; }
Append the `HeaderValue` to the existing list of headers.
Append the ` HeaderValue ` to the existing list of headers .
&mut self
value
HeaderValue