[−][src]Struct allow_me::Policy
Policy engine. Represents a read-only set of rules and can
evaluate Request
based on those rules.
Policy engine consists of two sets:
- static rules
- variable rules - any rule that contains variables ("{{..}}"). Static rules are organized in a data structure with fast querying time. Variable rules are evaluated on every request.
Implementations
impl<R, S, RC> Policy<R, S> where
R: ResourceMatcher<Context = RC>,
S: Substituter<Context = RC>,
[src]
R: ResourceMatcher<Context = RC>,
S: Substituter<Context = RC>,
pub fn evaluate(&self, request: &Request<RC>) -> Result<Decision>
[src]
Evaluates the provided Request
and produces the Decision
.
If no rules match the Request - the default Decision
is returned.
Trait Implementations
Auto Trait Implementations
impl<R, S> RefUnwindSafe for Policy<R, S> where
R: RefUnwindSafe,
S: RefUnwindSafe,
[src]
R: RefUnwindSafe,
S: RefUnwindSafe,
impl<R, S> Send for Policy<R, S> where
R: Send,
S: Send,
[src]
R: Send,
S: Send,
impl<R, S> Sync for Policy<R, S> where
R: Sync,
S: Sync,
[src]
R: Sync,
S: Sync,
impl<R, S> Unpin for Policy<R, S> where
R: Unpin,
S: Unpin,
[src]
R: Unpin,
S: Unpin,
impl<R, S> UnwindSafe for Policy<R, S> where
R: UnwindSafe,
S: UnwindSafe,
[src]
R: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,