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

Implementations

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 Clone for MailRequest[src]

impl Debug for MailRequest[src]

impl From<Mail> for MailRequest[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> HeaderTryFrom<T> for T[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,