[][src]Trait async_smtp::Transport

pub trait Transport<'a> {
    type Result;
#[must_use]    fn send<'life0, 'async_trait>(
        &'life0 mut self,
        email: SendableEmail
    ) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn send_with_timeout<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        email: SendableEmail,
        timeout: Option<&'life1 Duration>
    ) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Transport method for emails

Associated Types

type Result

Result type for the transport

Loading content...

Required methods

#[must_use]fn send<'life0, 'async_trait>(
    &'life0 mut self,
    email: SendableEmail
) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Sends the email

#[must_use]fn send_with_timeout<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    email: SendableEmail,
    timeout: Option<&'life1 Duration>
) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

impl<'a> Transport<'a> for FileTransport[src]

type Result = FileResult

impl<'a> Transport<'a> for SendmailTransport[src]

type Result = SendmailResult

impl<'a> Transport<'a> for SmtpTransport[src]

type Result = SmtpResult

fn send<'life0, 'async_trait>(
    &'life0 mut self,
    email: SendableEmail
) -> Pin<Box<dyn Future<Output = SmtpResult> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Sends an email

impl<'a> Transport<'a> for StubTransport[src]

type Result = StubResult

Loading content...