pub struct PermissionManager { /* private fields */ }Implementations§
Source§impl PermissionManager
impl PermissionManager
pub fn new(mode: PermissionMode) -> Self
pub fn grant(&mut self, resource: impl Into<String>, action: impl Into<String>)
pub fn grant_with_approval( &mut self, resource: impl Into<String>, action: impl Into<String>, note: impl Into<String>, )
pub fn revoke(&mut self, resource: &str, action: &str)
pub fn evaluate(&self, resource: &str, action: &str) -> PermissionDecision
Auto Trait Implementations§
impl Freeze for PermissionManager
impl RefUnwindSafe for PermissionManager
impl Send for PermissionManager
impl Sync for PermissionManager
impl Unpin for PermissionManager
impl UnsafeUnpin for PermissionManager
impl UnwindSafe for PermissionManager
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