pub trait MessageHandler: Send + Sync {
// Required methods
fn handle<'a>(&'a self, message: &'a EmailMessage) -> HandlerFuture<'a>;
fn name(&self) -> &str;
// Provided method
fn reject_reply(&self) -> Option<(u16, String)> { ... }
}Expand description
Trait for message handlers that process incoming emails.
Unlike [StorageEngine], this trait only handles the inbound direction
(receiving/storing), making it suitable for both storage backends
and queue-based destinations like Redis.
Required Methods§
Sourcefn handle<'a>(&'a self, message: &'a EmailMessage) -> HandlerFuture<'a>
fn handle<'a>(&'a self, message: &'a EmailMessage) -> HandlerFuture<'a>
Handles an incoming email message.