Enum stream_httparse::header::HeaderKey[][src]

pub enum HeaderKey<'a> {
    StrRef(&'a str),
    Str(String),
}

Allows the HeaderKey to take the form of a variety of different valid Types, mostly related to their lifetimes. This however also gives more control over how they are compared to each other, ignoring case in this case

use stream_httparse::header::HeaderKey;

assert_eq!(HeaderKey::StrRef("TeSt"), HeaderKey::StrRef("test"));

Variants

StrRef(&'a str)

Stores the Key as a refernce to a String

Str(String)

Stores the Key as an owned String

Implementations

impl<'a> HeaderKey<'a>[src]

pub fn serialize(&self, buf: &mut Vec<u8>)[src]

Serializes the Key into the Buffer by appending the Data to it

Trait Implementations

impl AsRef<str> for HeaderKey<'_>[src]

impl<'a> Clone for HeaderKey<'a>[src]

impl<'a> Debug for HeaderKey<'a>[src]

impl PartialEq<HeaderKey<'_>> for HeaderKey<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for HeaderKey<'a>

impl<'a> Send for HeaderKey<'a>

impl<'a> Sync for HeaderKey<'a>

impl<'a> Unpin for HeaderKey<'a>

impl<'a> UnwindSafe for HeaderKey<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.