RuleProcessor

Trait RuleProcessor 

Source
pub trait RuleProcessor {
    // Required methods
    fn find_rule_and_messages_for_label(
        &mut self,
        label: &str,
    ) -> impl Future<Output = Result<()>> + Send;
    fn set_execute(&mut self, value: bool);
    fn set_rule(&mut self, action: EolRule);
    fn action(&self) -> Option<EolAction>;
    fn prepare(&mut self, pages: u32) -> impl Future<Output = Result<()>> + Send;
    fn batch_delete(&self) -> impl Future<Output = Result<()>> + Send;
    fn batch_trash(&self) -> impl Future<Output = Result<()>> + Send;
}
Expand description

Rules processor to apply the configured rules to the mailbox.

Required Methods§

Source

fn find_rule_and_messages_for_label( &mut self, label: &str, ) -> impl Future<Output = Result<()>> + Send

Find the rule and the message for a specific label

Source

fn set_execute(&mut self, value: bool)

Set the execute flag in the client

Source

fn set_rule(&mut self, action: EolRule)

Set rule to process

Source

fn action(&self) -> Option<EolAction>

Report the action from the rule

Source

fn prepare(&mut self, pages: u32) -> impl Future<Output = Result<()>> + Send

Prepare a list of messages to trash or delete

Source

fn batch_delete(&self) -> impl Future<Output = Result<()>> + Send

Batch delete of messages

Source

fn batch_trash(&self) -> impl Future<Output = Result<()>> + Send

Batch trash

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§