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§
Sourcefn 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 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
Sourcefn 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_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
Sourcefn 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 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