pub trait IntoBody {
// Required method
fn into_body(self, encoding: Option<ContentTransferEncoding>) -> Body;
}Expand description
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§
Sourcefn into_body(self, encoding: Option<ContentTransferEncoding>) -> Body
fn into_body(self, encoding: Option<ContentTransferEncoding>) -> Body
Encode as valid body