Struct webmachine_rust::headers::HeaderValue
[−]
[src]
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
Methods
impl HeaderValue
[src]
fn parse_string(s: String) -> HeaderValue
Parses a header value string into a HeaderValue struct
fn basic(s: &String) -> HeaderValue
Creates a basic header value that has no parameters
fn to_string(&self) -> String
Converts this header value into a string representation
fn weak_etag(&self) -> Option<String>
Parses a weak ETag value. Weak etags are in the form W/
fn quote(self) -> HeaderValue
Convertes this header value into a quoted header value
impl HeaderValue
[src]
fn as_media_type(&self) -> MediaType
Converts the header value into a media type
impl HeaderValue
[src]
fn as_media_language(&self) -> MediaLanguage
Converts the header value into a media type
impl HeaderValue
[src]
fn as_charset(&self) -> Charset
Converts the header value into a media type
impl HeaderValue
[src]
fn as_encoding(&self) -> Encoding
Converts the header value into a media type
Trait Implementations
impl Debug for HeaderValue
[src]
impl Clone for HeaderValue
[src]
fn clone(&self) -> HeaderValue
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Eq for HeaderValue
[src]
impl PartialEq<HeaderValue> for HeaderValue
[src]
fn eq(&self, other: &HeaderValue) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<String> for HeaderValue
[src]
fn eq(&self, other: &String) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<str> for HeaderValue
[src]
fn eq(&self, other: &str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.