[−][src]Struct reqwest::header::HeaderValue
Represents an HTTP header field value.
In practice, HTTP header field values are usually valid ASCII. However, the HTTP spec allows for a header value to contain opaque bytes as well. In this case, the header field value is not able to be represented as a string.
To handle this, the HeaderValue is useable as a type and can be compared
with strings and implements Debug. A to_str fn is provided that returns
an Err if the header value contains non visible ascii characters.
Methods
impl HeaderValue[src]
impl HeaderValuepub fn from_static(src: &'static str) -> HeaderValue[src]
pub fn from_static(src: &'static str) -> HeaderValueConvert a static string to a HeaderValue.
This function will not perform any copying, however the string is checked to ensure that no invalid characters are present. Only visible ASCII characters (32-127) are permitted.
Panics
This function panics if the argument contains invalid header value characters.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val, "hello");
pub fn from_str(src: &str) -> Result<HeaderValue, InvalidHeaderValue>[src]
pub fn from_str(src: &str) -> Result<HeaderValue, InvalidHeaderValue>Attempt to convert a string to a HeaderValue.
If the argument contains invalid header value characters, an error is
returned. Only visible ASCII characters (32-127) are permitted. Use
from_bytes to create a HeaderValue that includes opaque octets
(128-255).
This function is intended to be replaced in the future by a TryFrom
implementation once the trait is stabilized in std.
Examples
let val = HeaderValue::from_str("hello").unwrap(); assert_eq!(val, "hello");
An invalid value
let val = HeaderValue::from_str("\n"); assert!(val.is_err());
pub fn from_name(name: HeaderName) -> HeaderValue[src]
pub fn from_name(name: HeaderName) -> HeaderValueConverts a HeaderName into a HeaderValue
Since every valid HeaderName is a valid HeaderValue this is done infallibly.
Examples
let val = HeaderValue::from_name(ACCEPT); assert_eq!(val, HeaderValue::from_bytes(b"accept").unwrap());
pub fn from_bytes(src: &[u8]) -> Result<HeaderValue, InvalidHeaderValue>[src]
pub fn from_bytes(src: &[u8]) -> Result<HeaderValue, InvalidHeaderValue>Attempt to convert a byte slice to a HeaderValue.
If the argument contains invalid header value bytes, an error is returned. Only byte values between 32 and 255 (inclusive) are permitted, excluding byte 127 (DEL).
This function is intended to be replaced in the future by a TryFrom
implementation once the trait is stabilized in std.
Examples
let val = HeaderValue::from_bytes(b"hello\xfa").unwrap(); assert_eq!(val, &b"hello\xfa"[..]);
An invalid value
let val = HeaderValue::from_bytes(b"\n"); assert!(val.is_err());
Attempt to convert a Bytes buffer to a HeaderValue.
If the argument contains invalid header value bytes, an error is returned. Only byte values between 32 and 255 (inclusive) are permitted, excluding byte 127 (DEL).
This function is intended to be replaced in the future by a TryFrom
implementation once the trait is stabilized in std.
Convert a Bytes directly into a HeaderValue without validating.
This function does NOT validate that illegal bytes are not contained within the buffer.
pub fn to_str(&self) -> Result<&str, ToStrError>[src]
pub fn to_str(&self) -> Result<&str, ToStrError>Yields a &str slice if the HeaderValue only contains visible ASCII
chars.
This function will perform a scan of the header value, checking all the characters.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val.to_str().unwrap(), "hello");
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturns the length of self.
This length is in bytes.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val.len(), 5);
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturns true if the HeaderValue has a length of zero bytes.
Examples
let val = HeaderValue::from_static(""); assert!(val.is_empty()); let val = HeaderValue::from_static("hello"); assert!(!val.is_empty());
pub fn as_bytes(&self) -> &[u8][src]
pub fn as_bytes(&self) -> &[u8]Converts a HeaderValue to a byte slice.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val.as_bytes(), b"hello");
pub fn set_sensitive(&mut self, val: bool)[src]
pub fn set_sensitive(&mut self, val: bool)Mark that the header value represents sensitive information.
Examples
let mut val = HeaderValue::from_static("my secret"); val.set_sensitive(true); assert!(val.is_sensitive()); val.set_sensitive(false); assert!(!val.is_sensitive());
pub fn is_sensitive(&self) -> bool[src]
pub fn is_sensitive(&self) -> boolReturns true if the value represents sensitive data.
Sensitive data could represent passwords or other data that should not
be stored on disk or in memory. This setting can be used by components
like caches to avoid storing the value. HPACK encoders must set the
header field to never index when is_sensitive returns true.
Note that sensitivity is not factored into equality or ordering.
Examples
let mut val = HeaderValue::from_static("my secret"); val.set_sensitive(true); assert!(val.is_sensitive()); val.set_sensitive(false); assert!(!val.is_sensitive());
Trait Implementations
impl Eq for HeaderValue[src]
impl Eq for HeaderValueimpl FromStr for HeaderValue[src]
impl FromStr for HeaderValuetype Err = InvalidHeaderValue
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>[src]
fn from_str(s: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>Parses a string s to return a value of this type. Read more
impl AsRef<[u8]> for HeaderValue[src]
impl AsRef<[u8]> for HeaderValueimpl From<i64> for HeaderValue[src]
impl From<i64> for HeaderValuefn from(num: i64) -> HeaderValue[src]
fn from(num: i64) -> HeaderValuePerforms the conversion.
impl From<usize> for HeaderValue[src]
impl From<usize> for HeaderValuefn from(num: usize) -> HeaderValue[src]
fn from(num: usize) -> HeaderValuePerforms the conversion.
impl From<u32> for HeaderValue[src]
impl From<u32> for HeaderValuefn from(num: u32) -> HeaderValue[src]
fn from(num: u32) -> HeaderValuePerforms the conversion.
impl From<i32> for HeaderValue[src]
impl From<i32> for HeaderValuefn from(num: i32) -> HeaderValue[src]
fn from(num: i32) -> HeaderValuePerforms the conversion.
impl From<i16> for HeaderValue[src]
impl From<i16> for HeaderValuefn from(num: i16) -> HeaderValue[src]
fn from(num: i16) -> HeaderValuePerforms the conversion.
impl From<isize> for HeaderValue[src]
impl From<isize> for HeaderValuefn from(num: isize) -> HeaderValue[src]
fn from(num: isize) -> HeaderValuePerforms the conversion.
impl From<HeaderValue> for Bytes[src]
impl From<HeaderValue> for Bytesfn from(value: HeaderValue) -> Bytes[src]
fn from(value: HeaderValue) -> BytesPerforms the conversion.
impl From<u16> for HeaderValue[src]
impl From<u16> for HeaderValuefn from(num: u16) -> HeaderValue[src]
fn from(num: u16) -> HeaderValuePerforms the conversion.
impl From<HeaderName> for HeaderValue[src]
impl From<HeaderName> for HeaderValuefn from(h: HeaderName) -> HeaderValue[src]
fn from(h: HeaderName) -> HeaderValuePerforms the conversion.
impl<'a> From<&'a HeaderValue> for HeaderValue[src]
impl<'a> From<&'a HeaderValue> for HeaderValuefn from(t: &'a HeaderValue) -> HeaderValue[src]
fn from(t: &'a HeaderValue) -> HeaderValuePerforms the conversion.
impl From<u64> for HeaderValue[src]
impl From<u64> for HeaderValuefn from(num: u64) -> HeaderValue[src]
fn from(num: u64) -> HeaderValuePerforms the conversion.
impl PartialOrd<HeaderValue> for [u8][src]
impl PartialOrd<HeaderValue> for [u8]fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialOrd<String> for HeaderValue[src]
impl PartialOrd<String> for HeaderValuefn partial_cmp(&self, other: &String) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &String) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialOrd<HeaderValue> for String[src]
impl PartialOrd<HeaderValue> for Stringfn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialOrd<HeaderValue> for str[src]
impl PartialOrd<HeaderValue> for strfn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialOrd<HeaderValue> for HeaderValue[src]
impl PartialOrd<HeaderValue> for HeaderValuefn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialOrd<str> for HeaderValue[src]
impl PartialOrd<str> for HeaderValuefn partial_cmp(&self, other: &str) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &str) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl<'a, T> PartialOrd<&'a T> for HeaderValue where
T: ?Sized,
HeaderValue: PartialOrd<T>, [src]
impl<'a, T> PartialOrd<&'a T> for HeaderValue where
T: ?Sized,
HeaderValue: PartialOrd<T>, fn partial_cmp(&self, other: &&'a T) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &&'a T) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialOrd<[u8]> for HeaderValue[src]
impl PartialOrd<[u8]> for HeaderValuefn partial_cmp(&self, other: &[u8]) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &[u8]) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl<'a> PartialOrd<HeaderValue> for &'a HeaderValue[src]
impl<'a> PartialOrd<HeaderValue> for &'a HeaderValuefn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl<'a> PartialOrd<HeaderValue> for &'a str[src]
impl<'a> PartialOrd<HeaderValue> for &'a strfn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for HeaderValue[src]
impl Ord for HeaderValuefn cmp(&self, other: &HeaderValue) -> Ordering[src]
fn cmp(&self, other: &HeaderValue) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl PartialEq<HeaderValue> for [u8][src]
impl PartialEq<HeaderValue> for [u8]fn eq(&self, other: &HeaderValue) -> bool[src]
fn eq(&self, other: &HeaderValue) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<HeaderValue> for HeaderValue[src]
impl PartialEq<HeaderValue> for HeaderValuefn eq(&self, other: &HeaderValue) -> bool[src]
fn eq(&self, other: &HeaderValue) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<HeaderValue> for str[src]
impl PartialEq<HeaderValue> for strfn eq(&self, other: &HeaderValue) -> bool[src]
fn eq(&self, other: &HeaderValue) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl<'a> PartialEq<HeaderValue> for &'a HeaderValue[src]
impl<'a> PartialEq<HeaderValue> for &'a HeaderValuefn eq(&self, other: &HeaderValue) -> bool[src]
fn eq(&self, other: &HeaderValue) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl<'a> PartialEq<HeaderValue> for &'a str[src]
impl<'a> PartialEq<HeaderValue> for &'a strfn eq(&self, other: &HeaderValue) -> bool[src]
fn eq(&self, other: &HeaderValue) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<String> for HeaderValue[src]
impl PartialEq<String> for HeaderValuefn eq(&self, other: &String) -> bool[src]
fn eq(&self, other: &String) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<[u8]> for HeaderValue[src]
impl PartialEq<[u8]> for HeaderValuefn eq(&self, other: &[u8]) -> bool[src]
fn eq(&self, other: &[u8]) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl<'a, T> PartialEq<&'a T> for HeaderValue where
T: ?Sized,
HeaderValue: PartialEq<T>, [src]
impl<'a, T> PartialEq<&'a T> for HeaderValue where
T: ?Sized,
HeaderValue: PartialEq<T>, fn eq(&self, other: &&'a T) -> bool[src]
fn eq(&self, other: &&'a T) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<HeaderValue> for String[src]
impl PartialEq<HeaderValue> for Stringfn eq(&self, other: &HeaderValue) -> bool[src]
fn eq(&self, other: &HeaderValue) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<str> for HeaderValue[src]
impl PartialEq<str> for HeaderValuefn eq(&self, other: &str) -> bool[src]
fn eq(&self, other: &str) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Debug for HeaderValue[src]
impl Debug for HeaderValuefn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl HttpTryFrom<i32> for HeaderValue[src]
impl HttpTryFrom<i32> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
num: i32
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<i32>>::Error>[src]
fn try_from(
num: i32
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<i32>>::Error>impl<'a> HttpTryFrom<&'a [u8]> for HeaderValue[src]
impl<'a> HttpTryFrom<&'a [u8]> for HeaderValuetype Error = InvalidHeaderValue
Associated error with the conversion this implementation represents.
fn try_from(
t: &'a [u8]
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<&'a [u8]>>::Error>[src]
fn try_from(
t: &'a [u8]
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<&'a [u8]>>::Error>impl HttpTryFrom<i16> for HeaderValue[src]
impl HttpTryFrom<i16> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
num: i16
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<i16>>::Error>[src]
fn try_from(
num: i16
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<i16>>::Error>impl HttpTryFrom<HeaderValue> for HeaderValue[src]
impl HttpTryFrom<HeaderValue> for HeaderValuetype Error = Error
Associated error with the conversion this implementation represents.
fn try_from(
t: HeaderValue
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<HeaderValue>>::Error>[src]
fn try_from(
t: HeaderValue
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<HeaderValue>>::Error>impl HttpTryFrom<usize> for HeaderValue[src]
impl HttpTryFrom<usize> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
num: usize
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<usize>>::Error>[src]
fn try_from(
num: usize
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<usize>>::Error>impl HttpTryFrom<String> for HeaderValue[src]
impl HttpTryFrom<String> for HeaderValuetype Error = InvalidHeaderValueBytes
Associated error with the conversion this implementation represents.
fn try_from(
t: String
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<String>>::Error>[src]
fn try_from(
t: String
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<String>>::Error>impl HttpTryFrom<u32> for HeaderValue[src]
impl HttpTryFrom<u32> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
num: u32
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<u32>>::Error>[src]
fn try_from(
num: u32
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<u32>>::Error>impl HttpTryFrom<isize> for HeaderValue[src]
impl HttpTryFrom<isize> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
num: isize
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<isize>>::Error>[src]
fn try_from(
num: isize
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<isize>>::Error>impl HttpTryFrom<HeaderName> for HeaderValue[src]
impl HttpTryFrom<HeaderName> for HeaderValuetype Error = InvalidHeaderValue
Associated error with the conversion this implementation represents.
fn try_from(
name: HeaderName
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<HeaderName>>::Error>[src]
fn try_from(
name: HeaderName
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<HeaderName>>::Error>impl HttpTryFrom<u16> for HeaderValue[src]
impl HttpTryFrom<u16> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
num: u16
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<u16>>::Error>[src]
fn try_from(
num: u16
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<u16>>::Error>impl<'a> HttpTryFrom<&'a str> for HeaderValue[src]
impl<'a> HttpTryFrom<&'a str> for HeaderValuetype Error = InvalidHeaderValue
Associated error with the conversion this implementation represents.
fn try_from(
t: &'a str
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<&'a str>>::Error>[src]
fn try_from(
t: &'a str
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<&'a str>>::Error>impl HttpTryFrom<Bytes> for HeaderValue[src]
impl HttpTryFrom<Bytes> for HeaderValuetype Error = InvalidHeaderValueBytes
Associated error with the conversion this implementation represents.
fn try_from(
bytes: Bytes
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<Bytes>>::Error>[src]
fn try_from(
bytes: Bytes
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<Bytes>>::Error>impl HttpTryFrom<u64> for HeaderValue[src]
impl HttpTryFrom<u64> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
num: u64
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<u64>>::Error>[src]
fn try_from(
num: u64
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<u64>>::Error>impl<'a> HttpTryFrom<&'a HeaderValue> for HeaderValue[src]
impl<'a> HttpTryFrom<&'a HeaderValue> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
t: &'a HeaderValue
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<&'a HeaderValue>>::Error>[src]
fn try_from(
t: &'a HeaderValue
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<&'a HeaderValue>>::Error>impl HttpTryFrom<i64> for HeaderValue[src]
impl HttpTryFrom<i64> for HeaderValuetype Error = Never
Associated error with the conversion this implementation represents.
fn try_from(
num: i64
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<i64>>::Error>[src]
fn try_from(
num: i64
) -> Result<HeaderValue, <HeaderValue as HttpTryFrom<i64>>::Error>impl Hash for HeaderValue[src]
impl Hash for HeaderValuefn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Clone for HeaderValue[src]
impl Clone for HeaderValuefn clone(&self) -> HeaderValue[src]
fn clone(&self) -> HeaderValueReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
Auto Trait Implementations
impl Send for HeaderValue
impl Send for HeaderValueimpl Sync for HeaderValue
impl Sync for HeaderValueBlanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T[src]
fn borrow(&self) -> &TImmutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, fn equivalent(&self, key: &K) -> bool[src]
fn equivalent(&self, key: &K) -> boolCompare self to key and return true if they are equal.
impl<T> Erased for T[src]
impl<T> Erased for T