pub trait MimeHeaders<'x> {
    // Required methods
    fn content_description(&self) -> Option<&str>;
    fn content_disposition(&self) -> Option<&ContentType<'_>>;
    fn content_id(&self) -> Option<&str>;
    fn content_transfer_encoding(&self) -> Option<&str>;
    fn content_type(&self) -> Option<&ContentType<'_>>;
    fn content_language(&self) -> &HeaderValue<'_>;
    fn content_location(&self) -> Option<&str>;

    // Provided methods
    fn attachment_name(&self) -> Option<&str> { ... }
    fn is_content_type(&self, type_: &str, subtype: &str) -> bool { ... }
}
Expand description

MIME Header field access trait

Required Methods§

source

fn content_description(&self) -> Option<&str>

Returns the Content-Description field

source

fn content_disposition(&self) -> Option<&ContentType<'_>>

Returns the Content-Disposition field

source

fn content_id(&self) -> Option<&str>

Returns the Content-ID field

source

fn content_transfer_encoding(&self) -> Option<&str>

Returns the Content-Encoding field

source

fn content_type(&self) -> Option<&ContentType<'_>>

Returns the Content-Type field

source

fn content_language(&self) -> &HeaderValue<'_>

Returns the Content-Language field

source

fn content_location(&self) -> Option<&str>

Returns the Content-Location field

Provided Methods§

source

fn attachment_name(&self) -> Option<&str>

Returns the attachment name, if any.

source

fn is_content_type(&self, type_: &str, subtype: &str) -> bool

Implementors§

source§

impl<'x> MimeHeaders<'x> for Message<'x>

source§

impl<'x> MimeHeaders<'x> for MessagePart<'x>