Struct trillium_http_types::headers::HeaderName [−][src]
pub struct HeaderName(_);
Expand description
A header name.
Implementations
Create a new HeaderName from a Vec of ASCII bytes.
Error
This function will error if the bytes is not valid ASCII.
Create a new HeaderName from an ASCII string.
Error
This function will error if the string is not valid ASCII.
Converts a vector of bytes to a HeaderName without checking that the string contains
valid ASCII.
Safety
This function is unsafe because it does not check that the bytes passed to it are valid ASCII. If this constraint is violated, it may cause memory unsafety issues with future users of the HeaderName, as the rest of the library assumes that Strings are valid ASCII.
Trait Implementations
Performs the conversion.
Performs the conversion.
Returns a reference to the value corresponding to the supplied name.
Panics
Panics if the name is not present in Headers.
type Output = HeaderValues
type Output = HeaderValuesThe returned type after indexing.
Returns a reference to the value corresponding to the supplied name.
Panics
Panics if the name is not present in Request.
type Output = HeaderValues
type Output = HeaderValuesThe returned type after indexing.
Returns a reference to the value corresponding to the supplied name.
Panics
Panics if the name is not present in Response.
type Output = HeaderValues
type Output = HeaderValuesThe returned type after indexing.
Returns a reference to the value corresponding to the supplied name.
Panics
Panics if the name is not present in Trailers.
type Output = HeaderValues
type Output = HeaderValuesThe returned type after indexing.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for HeaderNameimpl Send for HeaderNameimpl Sync for HeaderNameimpl Unpin for HeaderNameimpl UnwindSafe for HeaderNameBlanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V