[−][src]Struct mail_smtp::MailRequest
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(&self) -> 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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> HeaderTryFrom for T
[src]
fn try_from(val: T) -> Result<T, ComponentCreationError>
[src]
impl<F, T> HeaderTryInto for F where
T: HeaderTryFrom<F>,
[src]
T: HeaderTryFrom<F>,