pub struct RbacEngine { /* private fields */ }Expand description
A compiled, fast-lookup RBAC engine.
After construction from an RbacPolicy, the engine pre-computes:
- Effective permissions per role (with inheritance flattened).
- Subject → role mappings.
Every check() call does O(roles × patterns) work — fast enough for
the sizes of policies used in AI agent deployments.
Implementations§
Source§impl RbacEngine
impl RbacEngine
Trait Implementations§
Source§impl PolicyEngine for RbacEngine
impl PolicyEngine for RbacEngine
Source§fn with_fallback(self, fallback: Arc<dyn PolicyEngine>) -> FallbackEngine<Self>where
Self: Sized,
fn with_fallback(self, fallback: Arc<dyn PolicyEngine>) -> FallbackEngine<Self>where
Self: Sized,
Compose this engine with a fallback. Read more
Auto Trait Implementations§
impl Freeze for RbacEngine
impl RefUnwindSafe for RbacEngine
impl Send for RbacEngine
impl Sync for RbacEngine
impl Unpin for RbacEngine
impl UnsafeUnpin for RbacEngine
impl UnwindSafe for RbacEngine
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