Enum stream_httparse::header::HeaderValue[][src]

pub enum HeaderValue<'a> {
    StrRef(&'a str),
    Str(String),
    NumberUsize(usize),
}
Expand description

A single HeaderValue that can hold Data in a variety of forms allowing for easier and more flexible use

Variants

StrRef(&'a str)

Tuple Fields

0: &'a str

Stores the Value as a reference to a String

Str(String)

Tuple Fields

0: String

Stores the Value as an owned String

NumberUsize(usize)

Tuple Fields

0: usize

Stores the Value in its raw Number format

Implementations

Serializes the Value into the given Buffer by appending the Data to it

Turns the given Value, regardless of how it is stored, into an owned String

Compares the Two values without case

Any number type in either of them immediately returns false

Tries to return a reference to the underlying String, if it is a String, otherwise returns None

Returns the amount of space in bytes that this Value needs

Clones all the needed Data in order to create a new HeaderValue that is completly independant of the given self reference

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

This method tests for !=.

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

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.