Trait lettre::message::IntoBody[][src]

pub trait IntoBody {
    fn into_body(self, encoding: Option<ContentTransferEncoding>) -> Body;
}
This is supported on crate feature builder only.

A trait for something that takes an encoded Body.

Used by MessageBuilder::body and SinglePartBuilder::body, which can either take something that can be encoded into Body or a pre-encoded Body.

If encoding is None the best encoding between 7bit, quoted-printable and base64 is chosen based on the input body. Best option.

If encoding is Some the supplied encoding is used. NOTE: if using the specified encoding would result into a malformed body, this will panic!

Required methods

fn into_body(self, encoding: Option<ContentTransferEncoding>) -> Body[src]

Encode as valid body

Loading content...

Implementors

impl IntoBody for Body[src]

impl<T> IntoBody for T where
    T: Into<MaybeString>, 
[src]

Loading content...