[][src]Enum mail::MailType

pub enum MailType {
    Ascii,
    Mime8BitEnabled,
    Internationalized,
}

Specifies what kind of mail we want to create.

Variants

Ascii

A 7-bit us-ascii mail.

Mime8BitEnabled

A us-ascii mail, but the body can contain 8bit values.

This for example allows sending a mail with an utf-8 formatted body. But be aware that aspects like line length limit still count an the ascii bytes for "\r\n" still count as newlines. So using this for any non-us-ascii compatible encoding (e.g. utf-16) isn't a good idea. Neither is it suited for directly containing resources like images.

Internationalized

A internationalized mail.

Internationalized mails extend multiple grammar parts to allow any non us-ascii utf-8 code point additionally to the already allowed utf-8 code points. Internationalized mails are required for any mail containing a mailbox with an non us-ascii local/user part (the part before the @). They also strongly simplify non ascii utf-8 in all other places like e.g. the Subject header.

Methods

impl MailType[src]

pub fn is_internationalized(&self) -> bool[src]

Returns true if the self is equal to Internationalized

pub fn supports_8bit_bodies(&self) -> bool[src]

Returns true if self is either Internationalized or Mime8BitEnabled

Trait Implementations

impl Clone for MailType[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Hash for MailType[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Copy for MailType[src]

impl Eq for MailType[src]

impl PartialEq<MailType> for MailType[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Debug for MailType[src]

Auto Trait Implementations

impl Send for MailType

impl Sync for MailType

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<F, T> HeaderTryInto for F where
    T: HeaderTryFrom<F>, 
[src]

impl<T> HeaderTryFrom for T[src]

impl<T> Erased for T