Struct mail_parser::Part
source · [−]pub struct Part<'x, T> {
pub headers_rfc: RfcHeaders<'x>,
pub headers_raw: RawHeaders<'x>,
pub is_encoding_problem: bool,
pub body: T,
}
Expand description
Part of the message.
Fields
headers_rfc: RfcHeaders<'x>
headers_raw: RawHeaders<'x>
is_encoding_problem: bool
body: T
Implementations
sourceimpl<'x, T> Part<'x, T>
impl<'x, T> Part<'x, T>
pub fn new(
headers_rfc: RfcHeaders<'x>,
headers_raw: RawHeaders<'x>,
body: T,
is_encoding_problem: bool
) -> Self
pub fn get_body(&self) -> &T
Trait Implementations
sourceimpl<'x> BodyPart<'x> for Part<'x, Cow<'x, str>>
impl<'x> BodyPart<'x> for Part<'x, Cow<'x, str>>
sourceimpl<'x> BodyPart<'x> for Part<'x, Cow<'x, [u8]>>
impl<'x> BodyPart<'x> for Part<'x, Cow<'x, [u8]>>
sourceimpl<'x> BodyPart<'x> for Part<'x, MessageAttachment<'x>>
impl<'x> BodyPart<'x> for Part<'x, MessageAttachment<'x>>
sourceimpl<'de, 'x, T> Deserialize<'de> for Part<'x, T> where
T: Deserialize<'de>,
impl<'de, 'x, T> Deserialize<'de> for Part<'x, T> where
T: Deserialize<'de>,
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> Display for Part<'x, MessageAttachment<'x>>
impl<'x> Display for Part<'x, MessageAttachment<'x>>
sourceimpl<'x, T> MimeHeaders<'x> for Part<'x, T>
impl<'x, T> MimeHeaders<'x> for Part<'x, T>
sourcefn get_content_description(&self) -> Option<&str>
fn get_content_description(&self) -> Option<&str>
Returns the Content-Description field
sourcefn get_content_disposition(&self) -> Option<&ContentType<'_>>
fn get_content_disposition(&self) -> Option<&ContentType<'_>>
Returns the Content-Disposition field
sourcefn get_content_id(&self) -> Option<&str>
fn get_content_id(&self) -> Option<&str>
Returns the Content-ID field
sourcefn get_content_transfer_encoding(&self) -> Option<&str>
fn get_content_transfer_encoding(&self) -> Option<&str>
Returns the Content-Encoding field
sourcefn get_content_type(&self) -> Option<&ContentType<'_>>
fn get_content_type(&self) -> Option<&ContentType<'_>>
Returns the Content-Type field
sourcefn get_content_language(&self) -> &HeaderValue<'x>
fn get_content_language(&self) -> &HeaderValue<'x>
Returns the Content-Language field
sourcefn get_content_location(&self) -> Option<&str>
fn get_content_location(&self) -> Option<&str>
Returns the Content-Location field
sourcefn get_attachment_name(&self) -> Option<&str>
fn get_attachment_name(&self) -> Option<&str>
Returns the attachment name, if any.
impl<'x, T> StructuralPartialEq for Part<'x, T>
Auto Trait Implementations
impl<'x, T> RefUnwindSafe for Part<'x, T> where
T: RefUnwindSafe,
impl<'x, T> Send for Part<'x, T> where
T: Send,
impl<'x, T> Sync for Part<'x, T> where
T: Sync,
impl<'x, T> Unpin for Part<'x, T> where
T: Unpin,
impl<'x, T> UnwindSafe for Part<'x, T> where
T: UnwindSafe,
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