Skip to main content

Policy

Trait Policy 

Source
pub trait Policy:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 AuthzContext<'life2>,
    ) -> Pin<Box<dyn Future<Output = PolicyDecision> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn evaluate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 AuthzContext<'life2>, ) -> Pin<Box<dyn Future<Output = PolicyDecision> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§