RuleStorage

Trait RuleStorage 

Source
pub trait RuleStorage: Send + Sync {
    // Required methods
    fn store_rule<'life0, 'async_trait>(
        &'life0 mut self,
        rule: Rule,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_rule<'life0, 'life1, 'async_trait>(
        &'life0 self,
        rule_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Rule>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_all_rules<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Rule>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_rule<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        rule_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_rule<'life0, 'async_trait>(
        &'life0 mut self,
        rule: Rule,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Storage interface for rules

Required Methods§

Source

fn store_rule<'life0, 'async_trait>( &'life0 mut self, rule: Rule, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Store a rule

Source

fn get_rule<'life0, 'life1, 'async_trait>( &'life0 self, rule_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Rule>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieve a rule by ID

Source

fn get_all_rules<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Rule>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all rules

Source

fn delete_rule<'life0, 'life1, 'async_trait>( &'life0 mut self, rule_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a rule

Source

fn update_rule<'life0, 'async_trait>( &'life0 mut self, rule: Rule, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update a rule

Implementors§