pub struct Engine { /* private fields */ }Expand description
Canonical RBAC + ABAC engine with deny-override and default-deny semantics.
Implementations§
Source§impl Engine
impl Engine
Sourcepub fn new(roles: Vec<Role>, policies: Vec<Policy>) -> AppResult<Self>
pub fn new(roles: Vec<Role>, policies: Vec<Policy>) -> AppResult<Self>
Construct an engine from roles and policies.
Evaluate a request.
Deny policies are evaluated before role grants and allow policies.
Object-level constraints that should limit a role should be attached to the role Permission;
constraints that must override any broad grant should be modeled as deny policies.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Engine
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
impl UnwindSafe for Engine
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