[][src]Trait aliri::Policy

pub trait Policy {
    type Request;
    type Denial: Debug + Display + Send + Sync + 'static;
    fn evaluate(&self, request: &Self::Request) -> Result<(), Self::Denial>;
}

A policy against which a request will be evaluated

Associated Types

type Request

The request type evaluated by this policy

type Denial: Debug + Display + Send + Sync + 'static

The error returned when this policy denies a request

Loading content...

Required methods

fn evaluate(&self, request: &Self::Request) -> Result<(), Self::Denial>

Evaluates the request, producing an effect

Loading content...

Implementations on Foreign Types

impl<'_, T> Policy for &'_ T where
    T: Policy
[src]

type Request = T::Request

type Denial = T::Denial

impl<T> Policy for Box<T> where
    T: Policy
[src]

type Request = T::Request

type Denial = T::Denial

impl<T> Policy for Rc<T> where
    T: Policy
[src]

type Request = T::Request

type Denial = T::Denial

impl<T> Policy for Arc<T> where
    T: Policy
[src]

type Request = T::Request

type Denial = T::Denial

Loading content...

Implementors

Loading content...