pub struct HeaderValue(/* private fields */);Expand description
Email header field value.
Implementations§
Source§impl HeaderValue
impl HeaderValue
Sourcepub fn new(value: impl AsRef<str>) -> Result<HeaderValue, HeaderParseError>
pub fn new(value: impl AsRef<str>) -> Result<HeaderValue, HeaderParseError>
Creates a validated single-line header value.
Trait Implementations§
Source§impl AsRef<str> for HeaderValue
impl AsRef<str> for HeaderValue
Source§impl Clone for HeaderValue
impl Clone for HeaderValue
Source§fn clone(&self) -> HeaderValue
fn clone(&self) -> HeaderValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeaderValue
impl Debug for HeaderValue
Source§impl Default for HeaderValue
impl Default for HeaderValue
Source§fn default() -> HeaderValue
fn default() -> HeaderValue
Returns the “default value” for a type. Read more
Source§impl Display for HeaderValue
impl Display for HeaderValue
Source§impl FromStr for HeaderValue
impl FromStr for HeaderValue
Source§type Err = HeaderParseError
type Err = HeaderParseError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>
fn from_str(value: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for HeaderValue
impl Hash for HeaderValue
Source§impl Ord for HeaderValue
impl Ord for HeaderValue
Source§fn cmp(&self, other: &HeaderValue) -> Ordering
fn cmp(&self, other: &HeaderValue) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HeaderValue
impl PartialEq for HeaderValue
Source§fn eq(&self, other: &HeaderValue) -> bool
fn eq(&self, other: &HeaderValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for HeaderValue
impl PartialOrd for HeaderValue
Source§impl TryFrom<&str> for HeaderValue
impl TryFrom<&str> for HeaderValue
Source§type Error = HeaderParseError
type Error = HeaderParseError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<HeaderValue, <HeaderValue as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<HeaderValue, <HeaderValue as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for HeaderValue
impl StructuralPartialEq for HeaderValue
Auto Trait Implementations§
impl Freeze for HeaderValue
impl RefUnwindSafe for HeaderValue
impl Send for HeaderValue
impl Sync for HeaderValue
impl Unpin for HeaderValue
impl UnsafeUnpin for HeaderValue
impl UnwindSafe for HeaderValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more