Enum mail_parser::HeaderName
source · pub enum HeaderName<'x> {
Show 38 variants
Subject,
From,
To,
Cc,
Date,
Bcc,
ReplyTo,
Sender,
Comments,
InReplyTo,
Keywords,
Received,
MessageId,
References,
ReturnPath,
MimeVersion,
ContentDescription,
ContentId,
ContentLanguage,
ContentLocation,
ContentTransferEncoding,
ContentType,
ContentDisposition,
ResentTo,
ResentFrom,
ResentBcc,
ResentCc,
ResentSender,
ResentDate,
ResentMessageId,
ListArchive,
ListHelp,
ListId,
ListOwner,
ListPost,
ListSubscribe,
ListUnsubscribe,
Other(Cow<'x, str>),
}
Expand description
A header field
Variants§
Subject
From
To
Cc
Date
Bcc
ReplyTo
Sender
Comments
InReplyTo
Keywords
Received
MessageId
References
ReturnPath
MimeVersion
ContentDescription
ContentId
ContentLanguage
ContentLocation
ContentTransferEncoding
ContentType
ContentDisposition
ResentTo
ResentFrom
ResentBcc
ResentCc
ResentSender
ResentDate
ResentMessageId
ListArchive
ListHelp
ListId
ListOwner
ListPost
ListSubscribe
ListUnsubscribe
Other(Cow<'x, str>)
Implementations§
source§impl<'x> HeaderName<'x>
impl<'x> HeaderName<'x>
pub fn to_owned(&self) -> HeaderName<'static>
pub fn into_owned(self) -> HeaderName<'static>
pub fn into_string(self) -> String
pub fn as_str<'y: 'x>(&'y self) -> &'x str
pub fn as_static_str(&self) -> &'static str
pub fn len(&self) -> usize
sourcepub fn is_mime_header(&self) -> bool
pub fn is_mime_header(&self) -> bool
Returns true if it is a MIME header.
pub fn is_empty(&self) -> bool
pub fn id(&self) -> u8
source§impl<'x> HeaderName<'x>
impl<'x> HeaderName<'x>
Trait Implementations§
source§impl<'x> Clone for HeaderName<'x>
impl<'x> Clone for HeaderName<'x>
source§fn clone(&self) -> HeaderName<'x>
fn clone(&self) -> HeaderName<'x>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'x> Debug for HeaderName<'x>
impl<'x> Debug for HeaderName<'x>
source§impl Display for HeaderName<'_>
impl Display for HeaderName<'_>
source§impl<'x> From<&'x str> for HeaderName<'x>
impl<'x> From<&'x str> for HeaderName<'x>
source§impl From<HeaderName<'_>> for String
impl From<HeaderName<'_>> for String
source§fn from(header: HeaderName<'_>) -> Self
fn from(header: HeaderName<'_>) -> Self
Converts to this type from the input type.
source§impl<'x> From<HeaderName<'x>> for Cow<'x, str>
impl<'x> From<HeaderName<'x>> for Cow<'x, str>
source§fn from(header: HeaderName<'x>) -> Self
fn from(header: HeaderName<'x>) -> Self
Converts to this type from the input type.
source§impl<'x> From<HeaderName<'x>> for u8
impl<'x> From<HeaderName<'x>> for u8
source§fn from(name: HeaderName<'x>) -> Self
fn from(name: HeaderName<'x>) -> Self
Converts to this type from the input type.
source§impl<'x> From<String> for HeaderName<'x>
impl<'x> From<String> for HeaderName<'x>
source§impl From<u8> for HeaderName<'_>
impl From<u8> for HeaderName<'_>
source§impl<'x> Hash for HeaderName<'x>
impl<'x> Hash for HeaderName<'x>
source§impl<'x> Ord for HeaderName<'x>
impl<'x> Ord for HeaderName<'x>
source§fn cmp(&self, other: &HeaderName<'x>) -> Ordering
fn cmp(&self, other: &HeaderName<'x>) -> Ordering
1.21.0 · 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§impl<'x> PartialOrd for HeaderName<'x>
impl<'x> PartialOrd for HeaderName<'x>
source§fn partial_cmp(&self, other: &HeaderName<'x>) -> Option<Ordering>
fn partial_cmp(&self, other: &HeaderName<'x>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for HeaderName<'_>
Auto Trait Implementations§
impl<'x> Freeze for HeaderName<'x>
impl<'x> RefUnwindSafe for HeaderName<'x>
impl<'x> Send for HeaderName<'x>
impl<'x> Sync for HeaderName<'x>
impl<'x> Unpin for HeaderName<'x>
impl<'x> UnwindSafe for HeaderName<'x>
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