Skip to main content

OutboundMail

Trait OutboundMail 

Source
pub trait OutboundMail: Send + Sync {
    // Required method
    fn send<'life0, 'life1, 'async_trait>(
        &'life0 self,
        reply: &'life1 OutboundReply,
    ) -> Pin<Box<dyn Future<Output = Result<(), SendError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Outbound-mail transport, seamed behind a trait so a caller can test against an in-memory double instead of a live HTTP relay.

Required Methods§

Source

fn send<'life0, 'life1, 'async_trait>( &'life0 self, reply: &'life1 OutboundReply, ) -> Pin<Box<dyn Future<Output = Result<(), SendError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Send reply.

§Errors

Returns SendError when the transport fails or the relay rejects the send. The caller treats any error as retryable.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§