pub trait BodyPart<'x>: Display + MimeHeaders<'x> {
    fn get_contents(&'x self) -> &'x [u8]Notable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8];
    fn get_text_contents(&'x self) -> &'x str;
    fn len(&self) -> usize;
    fn is_text(&self) -> bool;
    fn is_binary(&self) -> bool;

    fn is_empty(&self) -> bool { ... }
}
Expand description

An inline Text or Binary body part.

Required Methods

Returns the body part’s contents as a u8 slice

Returns the body part’s contents as a str

Returns the body part’s length

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

Returns true when the part is not text

Provided Methods

Returns true when the body part is empty

Implementors