pub struct MessagePart<'x> {
    pub headers: Vec<Header<'x>>,
    pub is_encoding_problem: bool,
    pub body: PartType<'x>,
    pub encoding: Encoding,
    pub offset_header: usize,
    pub offset_body: usize,
    pub offset_end: usize,
}
Expand description

MIME Message Part

Fields

headers: Vec<Header<'x>>is_encoding_problem: boolbody: PartType<'x>encoding: Encodingoffset_header: usizeoffset_body: usizeoffset_end: usize

Implementations

Returns the body part’s contents as a u8 slice

Returns the body part’s contents as a str

Returns the nested message

Returns the sub parts ids of a MIME part

Returns the body part’s length

Returns true when the body part MIME type is text/*

Returns true when the body part MIME type is text/tml

Returns true when the part is binary

Returns true when the part is multipart

Returns true when the part is a nested message

Returns true when the body part is empty

Get the message headers

Returns the body raw length

Get the raw header offset of this part

Get the raw body offset of this part

Get the raw body end offset of this part

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Returns the Content-Description field

Returns the Content-Disposition field

Returns the Content-ID field

Returns the Content-Encoding field

Returns the Content-Type field

Returns the Content-Language field

Returns the Content-Location field

Returns the attachment name, if any.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.