http::headers
On this page
Header fields (RFC 9110): a case-insensitive multimap that keeps insertion order.
Structs
HeaderMapSource
pub struct HeaderMapHeader fields in order. Names are stored lowercase (lookups ignore
case); a name may repeat. Like List, a HeaderMap is a handle:
copies share the fields (clone for an independent map).
Number of fields (each repeat counts).
The first value of
name.Every value of
name, in order.Add a field after the existing ones.
Replace every value of
namewithvalue.Remove every value of
name; whether there was one.(name, value)pairs in order, names lowercase.Whether a comma-separated list header
namecontainstoken(ASCII case-insensitive):has_token("connection", "close").Throws if a name is not a token or a value has CR, LF, NUL or another control character (except tab): what goes on the wire must not be able to inject fields.
Trait implementations 2
impl Clone for HeaderMapimpl Debug for HeaderMap
Functions
is_tokenSource
pub fn is_token(s: str) -> bool A non-empty run of tchars.
is_field_valueSource
pub fn is_field_value(s: str) -> bool A field value: visible ASCII, space, tab and obs-text, no leading or trailing whitespace.