pub trait MailQueue {
type Mail;
type MailFuture: Future<Item = Option<Self::Mail>>;
fn mail(&self, envelope: Envelope) -> Self::MailFuture;
}
Expand description
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()
.