Trait samotop::service::MailQueue [−][src]
pub trait MailQueue { type Mail; type MailFuture: Future<Item = Option<Self::Mail>>; fn mail(&self, envelope: Envelope) -> Self::MailFuture; }
A mail queue allows us to queue an e-mail.
We start with an envelope. Then, depending on implementation,
the Mail
implementation receives the e-mail body.
Finally, the caller queues the mail by calling Mail.queue()
.
Associated Types
type Mail
type MailFuture: Future<Item = Option<Self::Mail>>
Required Methods
fn mail(&self, envelope: Envelope) -> Self::MailFuture
Implementors
impl MailQueue for ConsoleMail type Mail = MailSink; type MailFuture = FutureResult<Option<Self::Mail>, Error>;