[][src]Struct mail_smtp::MailRequest

pub struct MailRequest { /* fields omitted */ }

This type contains a mail and potentially some envelop data.

It is needed as in some edge cases the smtp envelop data (i.e. smtp from and smtp recipient) can not be correctly derived from the mail.

The default usage is to directly turn a Mail into a MailRequest by either using MailRequest::new, MailRequest::from or Mail::into.

Methods

impl MailRequest[src]

pub fn new(mail: Mail) -> Self[src]

creates a new MailRequest from a Mail instance

pub fn new_with_envelop(mail: Mail, envelop: EnvelopData) -> Self[src]

create a new MailRequest and use custom smtp EnvelopData

Note that envelop data comes from new-tokio-smtp::send_mail and is not re-exported so if you happen to run into one of the view cases where you need to set it manually just import it from new-tokio-smtp.

pub fn override_envelop(&mut self, envelop: EnvelopData) -> Option<EnvelopData>[src]

replace the smtp EnvelopData

pub fn _into_mail_with_envelop(self) -> Result<(Mail, EnvelopData), MailError>[src]

Trait Implementations

impl From<Mail> for MailRequest[src]

impl Clone for MailRequest[src]

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

Performs copy-assignment from source. Read more

impl Debug for MailRequest[src]

Auto Trait Implementations

impl Send for MailRequest

impl Sync for MailRequest

Blanket Implementations

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> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?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

The type returned in the event of a conversion error.

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

impl<T> Erased for T

impl<T> HeaderTryFrom for T[src]

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