[][src]Trait samotop_core::service::mail::MailQueue

pub trait MailQueue: Send + Sync {
    type Mail: Sink<Bytes, Error = Error>;
    type MailFuture: Future<Output = Option<Self::Mail>>;
    fn mail(&self, envelope: Envelope) -> Self::MailFuture;
}

A mail queue allows us to queue an e-mail. For a given mail envelope it produces a Sink that can receive mail data. Once the sink is closed successfully, the mail is queued.

Associated Types

type Mail: Sink<Bytes, Error = Error>

type MailFuture: Future<Output = Option<Self::Mail>>

Loading content...

Required methods

fn mail(&self, envelope: Envelope) -> Self::MailFuture

Loading content...

Implementors

impl MailQueue for DefaultMailService[src]

type Mail = MailSink

type MailFuture = Ready<Option<Self::Mail>>

impl<NS, ES, GS, QS> MailQueue for CompositeMailService<NS, ES, GS, QS> where
    NS: NamedService,
    ES: EsmtpService,
    GS: MailGuard,
    QS: MailQueue
[src]

type Mail = QS::Mail

type MailFuture = QS::MailFuture

impl<T> MailQueue for Arc<T> where
    T: MailQueue
[src]

type Mail = T::Mail

type MailFuture = T::MailFuture

Loading content...