Trait aliri_traits::Policy [−][src]
pub trait Policy { type Request; type Denial: Debug + Display + Send + Sync + 'static; fn evaluate(&self, request: &Self::Request) -> Result<(), Self::Denial>; }
Expand description
A policy against which a request will be evaluated
Associated Types
type Request
[src]
Expand description
The request type evaluated by this policy
type Denial: Debug + Display + Send + Sync + 'static
[src]
Expand description
The error returned when this policy denies a request
Required methods
fn evaluate(&self, request: &Self::Request) -> Result<(), Self::Denial>
[src]
Expand description
Evaluates the request, producing an effect