Struct async_smtp::stub::StubTransport
source · pub struct StubTransport { /* private fields */ }
Expand description
This transport logs the message envelope and returns the given response
Implementations§
source§impl StubTransport
impl StubTransport
sourcepub fn new(response: StubResult) -> StubTransport
pub fn new(response: StubResult) -> StubTransport
Creates a new transport that always returns the given response
sourcepub fn new_positive() -> StubTransport
pub fn new_positive() -> StubTransport
Creates a new transport that always returns a success response
Trait Implementations§
source§impl Clone for StubTransport
impl Clone for StubTransport
source§fn clone(&self) -> StubTransport
fn clone(&self) -> StubTransport
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 Debug for StubTransport
impl Debug for StubTransport
source§impl<'a> Transport<'a> for StubTransport
impl<'a> Transport<'a> for StubTransport
source§fn send<'life0, 'async_trait>(
&'life0 mut self,
email: SendableEmail
) -> Pin<Box<dyn Future<Output = StubResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 mut self,
email: SendableEmail
) -> Pin<Box<dyn Future<Output = StubResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends the email