Skip to main content

Matcher

Trait Matcher 

Source
pub trait Matcher: Send + Sync {
    // Required methods
    fn match_mail<'life0, 'life1, 'async_trait>(
        &'life0 self,
        mail: &'life1 Mail,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MailAddress>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn name(&self) -> &str;
}
Expand description

Matcher trait - filter recipients based on criteria

Required Methods§

Source

fn match_mail<'life0, 'life1, 'async_trait>( &'life0 self, mail: &'life1 Mail, ) -> Pin<Box<dyn Future<Output = Result<Vec<MailAddress>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns subset of recipients matching criteria

Source

fn name(&self) -> &str

Matcher name for logging

Implementors§