Enum mail_parser::MessagePart
source · [−]pub enum MessagePart<'x> {
Text(Part<'x, Cow<'x, str>>),
Html(Part<'x, Cow<'x, str>>),
Binary(Part<'x, Cow<'x, [u8]>>),
InlineBinary(Part<'x, Cow<'x, [u8]>>),
Message(Part<'x, MessageAttachment<'x>>),
Multipart(MultiPart<'x>),
}
Expand description
A text, binary or nested e-mail MIME message part.
- Text: Any text/* part
- Binary: Any other part type that is not text.
- Message: Nested RFC5322 message.
- MultiPart: Multipart part.
Variants
Text(Part<'x, Cow<'x, str>>)
Any text/* part
Html(Part<'x, Cow<'x, str>>)
A text/html part
Binary(Part<'x, Cow<'x, [u8]>>)
Any other part type that is not text.
InlineBinary(Part<'x, Cow<'x, [u8]>>)
Any inline binary data that.
Message(Part<'x, MessageAttachment<'x>>)
Nested RFC5322 message.
Multipart(MultiPart<'x>)
Multipart part
Implementations
sourceimpl<'x> MessagePart<'x>
impl<'x> MessagePart<'x>
pub fn unwrap_text(&self) -> &Part<'x, Cow<'x, str>>
pub fn unwrap_binary(&self) -> &Part<'x, Cow<'x, [u8]>>
pub fn unwrap_message(&self) -> &Message<'_>
pub fn parse_message(&'x self) -> Option<Message<'x>>
Trait Implementations
sourceimpl<'x> Debug for MessagePart<'x>
impl<'x> Debug for MessagePart<'x>
sourceimpl<'de: 'x, 'x> Deserialize<'de> for MessagePart<'x>
impl<'de: 'x, 'x> Deserialize<'de> for MessagePart<'x>
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'x> PartialEq<MessagePart<'x>> for MessagePart<'x>
impl<'x> PartialEq<MessagePart<'x>> for MessagePart<'x>
sourcefn eq(&self, other: &MessagePart<'x>) -> bool
fn eq(&self, other: &MessagePart<'x>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MessagePart<'x>) -> bool
fn ne(&self, other: &MessagePart<'x>) -> bool
This method tests for !=
.
sourceimpl<'x> Serialize for MessagePart<'x>
impl<'x> Serialize for MessagePart<'x>
impl<'x> StructuralPartialEq for MessagePart<'x>
Auto Trait Implementations
impl<'x> RefUnwindSafe for MessagePart<'x>
impl<'x> Send for MessagePart<'x>
impl<'x> Sync for MessagePart<'x>
impl<'x> Unpin for MessagePart<'x>
impl<'x> UnwindSafe for MessagePart<'x>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more