pub struct PolicyEngine { /* private fields */ }Expand description
Policy engine — evaluates a collection of rules.
Implementations§
Source§impl PolicyEngine
impl PolicyEngine
Sourcepub fn evaluate(
&self,
request: &SessionRequest,
ctx: &PolicyContext,
) -> Result<(), PolicyDenial>
pub fn evaluate( &self, request: &SessionRequest, ctx: &PolicyContext, ) -> Result<(), PolicyDenial>
Evaluate all rules. Returns the first denial encountered, or
Ok(()) if all rules pass.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PolicyEngine
impl !UnwindSafe for PolicyEngine
impl Freeze for PolicyEngine
impl Send for PolicyEngine
impl Sync for PolicyEngine
impl Unpin for PolicyEngine
impl UnsafeUnpin for PolicyEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more