Struct headers_ext::ToValues [−][src]
pub struct ToValues<'a> { /* fields omitted */ }A builder to append HeaderValues to during Header::encode.
Methods
impl<'a> ToValues<'a>[src]
impl<'a> ToValues<'a>pub fn append(&mut self, value: HeaderValue)[src]
pub fn append(&mut self, value: HeaderValue)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_fmt<T>(&mut self, fmt: T) where
T: Display, [src]
pub fn append_fmt<T>(&mut self, fmt: T) where
T: Display, Append the impl Display to the list of headers.
Panics
Encoding HeaderValues is expected to be infallible. However, not
all UTF-8 sequences are valid for a HeaderValue. The type passed
here must ensure that its resulting string is a valid HeaderValue.