[][src]Struct webmachine_rust::headers::HeaderValue

pub struct HeaderValue {
    pub value: String,
    pub params: HashMap<String, String>,
    pub quote: bool,
}

Struct to represent a header value and a map of header value parameters

Fields

value: String

Value of the header

params: HashMap<String, String>

Map of header value parameters

quote: bool

If the header should be qouted

Implementations

impl HeaderValue[src]

pub fn parse_string(s: String) -> HeaderValue[src]

Parses a header value string into a HeaderValue struct

pub fn basic(s: &String) -> HeaderValue[src]

Creates a basic header value that has no parameters

pub fn to_string(&self) -> String[src]

Converts this header value into a string representation

pub fn weak_etag(&self) -> Option<String>[src]

Parses a weak ETag value. Weak etags are in the form W/. Returns the contents of the qouted string if it matches, otherwise returns None.

pub fn quote(self) -> HeaderValue[src]

Convertes this header value into a quoted header value

impl HeaderValue[src]

pub fn as_media_type(&self) -> MediaType[src]

Converts the header value into a media type

impl HeaderValue[src]

pub fn as_media_language(&self) -> MediaLanguage[src]

Converts the header value into a media type

impl HeaderValue[src]

pub fn as_charset(&self) -> Charset[src]

Converts the header value into a media type

impl HeaderValue[src]

pub fn as_encoding(&self) -> Encoding[src]

Converts the header value into a media type

Trait Implementations

impl Clone for HeaderValue[src]

impl Debug for HeaderValue[src]

impl Eq for HeaderValue[src]

impl Hash for HeaderValue[src]

impl PartialEq<HeaderValue> for HeaderValue[src]

impl PartialEq<String> for HeaderValue[src]

impl PartialEq<str> for HeaderValue[src]

impl StructuralEq for HeaderValue[src]

Auto Trait Implementations

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.