pub struct HeaderName(/* private fields */);Expand description
Email header field name.
Implementations§
Source§impl HeaderName
impl HeaderName
Sourcepub fn new(value: impl AsRef<str>) -> Result<HeaderName, HeaderParseError>
pub fn new(value: impl AsRef<str>) -> Result<HeaderName, HeaderParseError>
Creates a validated header name.
Trait Implementations§
Source§impl AsRef<str> for HeaderName
impl AsRef<str> for HeaderName
Source§impl Clone for HeaderName
impl Clone for HeaderName
Source§fn clone(&self) -> HeaderName
fn clone(&self) -> HeaderName
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 HeaderName
impl Debug for HeaderName
Source§impl Display for HeaderName
impl Display for HeaderName
Source§impl FromStr for HeaderName
impl FromStr for HeaderName
Source§type Err = HeaderParseError
type Err = HeaderParseError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<HeaderName, <HeaderName as FromStr>::Err>
fn from_str(value: &str) -> Result<HeaderName, <HeaderName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for HeaderName
impl Hash for HeaderName
Source§impl Ord for HeaderName
impl Ord for HeaderName
Source§fn cmp(&self, other: &HeaderName) -> Ordering
fn cmp(&self, other: &HeaderName) -> 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 HeaderName
impl PartialEq for HeaderName
Source§fn eq(&self, other: &HeaderName) -> bool
fn eq(&self, other: &HeaderName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for HeaderName
impl PartialOrd for HeaderName
Source§impl TryFrom<&str> for HeaderName
impl TryFrom<&str> for HeaderName
Source§type Error = HeaderParseError
type Error = HeaderParseError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<HeaderName, <HeaderName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<HeaderName, <HeaderName as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for HeaderName
impl StructuralPartialEq for HeaderName
Auto Trait Implementations§
impl Freeze for HeaderName
impl RefUnwindSafe for HeaderName
impl Send for HeaderName
impl Sync for HeaderName
impl Unpin for HeaderName
impl UnsafeUnpin for HeaderName
impl UnwindSafe for HeaderName
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