Skip to main content

Policy

Trait Policy 

Source
pub trait Policy: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn evaluate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 PolicyContext,
    ) -> Pin<Box<dyn Future<Output = Result<PolicyOutcome, AgentError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn evaluate<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 PolicyContext, ) -> Pin<Box<dyn Future<Output = Result<PolicyOutcome, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§