Struct lettre::AsyncFileTransport
source · pub struct AsyncFileTransport<E: Executor> { /* private fields */ }
Available on crate feature
file-transport
and (crate features tokio1
or async-std1
) only.Expand description
Asynchronously writes the content and the envelope information to a file
Implementations§
source§impl<E> AsyncFileTransport<E>where
E: Executor,
impl<E> AsyncFileTransport<E>where
E: Executor,
sourcepub fn new<P: AsRef<Path>>(path: P) -> Self
pub fn new<P: AsRef<Path>>(path: P) -> Self
Creates a new transport to the given directory
Writes the email content in eml format.
sourcepub fn with_envelope<P: AsRef<Path>>(path: P) -> Self
pub fn with_envelope<P: AsRef<Path>>(path: P) -> Self
Creates a new transport to the given directory
Writes the email content in eml format and the envelope in json format.
Trait Implementations§
source§impl<E> AsyncTransport for AsyncFileTransport<E>where
E: Executor,
impl<E> AsyncTransport for AsyncFileTransport<E>where
E: Executor,
source§type Ok = String
type Ok = String
Available on crate features
tokio1
or async-std1
only.Response produced by the Transport
source§type Error = Error
type Error = Error
Available on crate features
tokio1
or async-std1
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
tokio1
or async-std1
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 features
tokio1
or async-std1
) and crate feature builder
only.Sends the email
source§impl<E: Clone + Executor> Clone for AsyncFileTransport<E>
impl<E: Clone + Executor> Clone for AsyncFileTransport<E>
source§fn clone(&self) -> AsyncFileTransport<E>
fn clone(&self) -> AsyncFileTransport<E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'de, E: Executor> Deserialize<'de> for AsyncFileTransport<E>
impl<'de, E: Executor> Deserialize<'de> for AsyncFileTransport<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 AsyncFileTransport<E>
impl<E> RefUnwindSafe for AsyncFileTransport<E>where
E: RefUnwindSafe,
impl<E> Send for AsyncFileTransport<E>
impl<E> Sync for AsyncFileTransport<E>
impl<E> Unpin for AsyncFileTransport<E>where
E: Unpin,
impl<E> UnwindSafe for AsyncFileTransport<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)