pub struct ContentTransferEncoding;
Expand description

The transfer encoding used to (transfer) encode the body (rfc2045)

This should either be:

  • 7bit: Us-ascii only text, default value if header filed is not present
  • quoted-printable: Data encoded with quoted-printable encoding).
  • base64: Data encoded with base64 encoding.

Through other defined values include:

  • 8bit: Data which is not encoded but still considers lines and line length, i.e. has no more then 998 bytes between two CRLF (or the start/end of data). Bodies of this kind can still be send if the server supports the 8bit mime extension.

  • binary: Data which is not encoded and can be any kind of arbitrary binary data. To send binary bodies the CHUNKING smpt extension (rfc3030) needs to be supported using BDATA instead of DATA to send the content. Note that the extension does not fix the potential but rare problem of accendentall multipart boundary collisions.

Nevertheless this encodings are mainly meant to be used for defining the domain of data in a system before it is encoded.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more
the component representing the header-field, e.g. Unstructured for Subject
a method returning the header name Read more
I true this will assure that the header is at most one time in a header map. Read more
A function which is meant to be called with a reference to the final header map before encoding the headers. It is meant to be used do some of the contextual validations, like e.g. a From header might return a function which checks if the From header has multiple mailboxes and if so checks if there is a Sender header Read more
Creates a Header instance automatically converting given body to the right type. Read more
Creates a Header instance for this header kind with given body.

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
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.