pub struct IcToken(_);
Available on crate feature
std
only.Expand description
A counter-based unforgeable token used to access the contents of a
TokenLock
.
This type lacks a Clone
implementation to ensure exclusive access to
TokenLock
.
Implementations
sourceimpl IcToken
impl IcToken
pub fn new() -> Self
sourcepub fn borrow_as_unsync(&mut self) -> IcTokenUnsyncRef<'_>
pub fn borrow_as_unsync(&mut self) -> IcTokenUnsyncRef<'_>
Borrow self
as a non-Sync
reference.
Non-Sync
tokens such as those created by this method can be used with
UnsyncTokenLock
.
Trait Implementations
impl Eq for IcToken
impl StructuralEq for IcToken
impl StructuralPartialEq for IcToken
Auto Trait Implementations
impl RefUnwindSafe for IcToken
impl Send for IcToken
impl Sync for IcToken
impl Unpin for IcToken
impl UnwindSafe for IcToken
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more