pub enum HeaderValue<'x> {
    Address(Addr<'x>),
    AddressList(Vec<Addr<'x>>),
    Group(Group<'x>),
    GroupList(Vec<Group<'x>>),
    Text(Cow<'x, str>),
    TextList(Vec<Cow<'x, str>>),
    DateTime(DateTime),
    ContentType(ContentType<'x>),
    Collection(Vec<HeaderValue<'x>>),
    Empty,
}
Expand description

Parsed header value.

Variants

Address(Addr<'x>)

Single address

AddressList(Vec<Addr<'x>>)

Address list

Group(Group<'x>)

Group of addresses

GroupList(Vec<Group<'x>>)

List containing two or more address groups

Text(Cow<'x, str>)

String

TextList(Vec<Cow<'x, str>>)

List of strings

DateTime(DateTime)

Datetime

ContentType(ContentType<'x>)

Content-Type or Content-Disposition header

Collection(Vec<HeaderValue<'x>>)

Collection of multiple header fields, for example Resent-To, References, etc.

Empty

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.