pub struct Revoker { /* private fields */ }Expand description
A handle that can revoke its associated RuntimeCap (and all clones).
Revoker is Send + Sync and Clone — multiple owners can hold revokers
to the same capability, and any of them can revoke it from any thread.
Revocation is idempotent: calling revoke multiple times
is safe and has no additional effect.
Implementations§
Source§impl Revoker
impl Revoker
Sourcepub fn revoke(&self)
pub fn revoke(&self)
Revokes the associated capability. All subsequent calls to
RuntimeCap::try_cap (and clones) will return Err(CapSecError::Revoked).
Idempotent — calling multiple times is safe.
Sourcepub fn is_revoked(&self) -> bool
pub fn is_revoked(&self) -> bool
Returns true if the capability has been revoked.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Revoker
impl RefUnwindSafe for Revoker
impl Send for Revoker
impl Sync for Revoker
impl Unpin for Revoker
impl UnsafeUnpin for Revoker
impl UnwindSafe for Revoker
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