pub struct AsyncSendmailTransport<E: Executor> { /* private fields */ }Available on crate feature
sendmail-transport and (crate features async-std1 or tokio1) only.Expand description
Asynchronously sends emails using the sendmail command
Implementations§
Source§impl<E> AsyncSendmailTransport<E>where
E: Executor,
impl<E> AsyncSendmailTransport<E>where
E: Executor,
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new transport with the sendmail command
Note: This uses the sendmail command in the current PATH. To use another command,
use AsyncSendmailTransport::new_with_command.
Sourcepub fn new_with_command<S: Into<OsString>>(command: S) -> Self
pub fn new_with_command<S: Into<OsString>>(command: S) -> Self
Creates a new transport to the given sendmail command
Trait Implementations§
Source§impl AsyncTransport for AsyncSendmailTransport<AsyncStd1Executor>
impl AsyncTransport for AsyncSendmailTransport<AsyncStd1Executor>
Source§type Ok = ()
type Ok = ()
Available on crate features
async-std1 or tokio1 only.Response produced by the Transport
Source§type Error = Error
type Error = Error
Available on crate features
async-std1 or tokio1 only.Error produced by the Transport
Source§fn send_raw<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
envelope: &'life1 Envelope,
email: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Self::Ok, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_raw<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
envelope: &'life1 Envelope,
email: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Self::Ok, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Available on crate features
async-std1 or tokio1 only.Source§fn send<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<Self::Ok, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<Self::Ok, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Available on crate feature
builder and (crate features async-std1 or tokio1) only.Sends the email
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Available on crate features
async-std1 or tokio1 only.Shuts down the transport. Future calls to
Self::send and
Self::send_raw might fail.Source§impl AsyncTransport for AsyncSendmailTransport<Tokio1Executor>
impl AsyncTransport for AsyncSendmailTransport<Tokio1Executor>
Source§type Ok = ()
type Ok = ()
Available on crate features
async-std1 or tokio1 only.Response produced by the Transport
Source§type Error = Error
type Error = Error
Available on crate features
async-std1 or tokio1 only.Error produced by the Transport
Source§fn send_raw<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
envelope: &'life1 Envelope,
email: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Self::Ok, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_raw<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
envelope: &'life1 Envelope,
email: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Self::Ok, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Available on crate features
async-std1 or tokio1 only.Source§fn send<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<Self::Ok, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<Self::Ok, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Available on crate feature
builder and (crate features async-std1 or tokio1) only.Sends the email
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Available on crate features
async-std1 or tokio1 only.Shuts down the transport. Future calls to
Self::send and
Self::send_raw might fail.Source§impl<E: Clone + Executor> Clone for AsyncSendmailTransport<E>
impl<E: Clone + Executor> Clone for AsyncSendmailTransport<E>
Source§fn clone(&self) -> AsyncSendmailTransport<E>
fn clone(&self) -> AsyncSendmailTransport<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E> Default for AsyncSendmailTransport<E>where
E: Executor,
impl<E> Default for AsyncSendmailTransport<E>where
E: Executor,
Source§impl<'de, E: Executor> Deserialize<'de> for AsyncSendmailTransport<E>
impl<'de, E: Executor> Deserialize<'de> for AsyncSendmailTransport<E>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<E> Freeze for AsyncSendmailTransport<E>
impl<E> RefUnwindSafe for AsyncSendmailTransport<E>where
E: RefUnwindSafe,
impl<E> Send for AsyncSendmailTransport<E>
impl<E> Sync for AsyncSendmailTransport<E>
impl<E> Unpin for AsyncSendmailTransport<E>where
E: Unpin,
impl<E> UnsafeUnpin for AsyncSendmailTransport<E>
impl<E> UnwindSafe for AsyncSendmailTransport<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more