pub struct LoggedSendCap<P: Permission> { /* private fields */ }Expand description
A thread-safe audited capability token.
Created via LoggedCap::make_send. Unlike LoggedCap, this implements
Send + Sync, making it usable with std::thread::spawn, tokio::spawn, etc.
Implementations§
Source§impl<P: Permission> LoggedSendCap<P>
impl<P: Permission> LoggedSendCap<P>
Sourcepub fn try_cap(&self) -> Result<Cap<P>, CapSecError>
pub fn try_cap(&self) -> Result<Cap<P>, CapSecError>
Attempts to obtain a Cap<P> and records the attempt in the audit log.
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Returns the number of entries in the audit log.
Trait Implementations§
Source§impl<P: Permission> Clone for LoggedSendCap<P>
impl<P: Permission> Clone for LoggedSendCap<P>
impl<P: Permission> Send for LoggedSendCap<P>
impl<P: Permission> Sync for LoggedSendCap<P>
Auto Trait Implementations§
impl<P> Freeze for LoggedSendCap<P>
impl<P> RefUnwindSafe for LoggedSendCap<P>where
P: RefUnwindSafe,
impl<P> Unpin for LoggedSendCap<P>where
P: Unpin,
impl<P> UnsafeUnpin for LoggedSendCap<P>
impl<P> UnwindSafe for LoggedSendCap<P>where
P: UnwindSafe,
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