pub struct LockToken(/* private fields */);Expand description
Opaque token returned by a successful lock acquisition.
The token proves lock ownership and must be presented when releasing or extending the lock. This prevents workers from accidentally releasing locks they do not own.
§Examples
use reinhardt_tasks::LockToken;
let token = LockToken::generate();
assert!(!token.as_str().is_empty());Implementations§
Trait Implementations§
impl Eq for LockToken
impl StructuralPartialEq for LockToken
Auto Trait Implementations§
impl Freeze for LockToken
impl RefUnwindSafe for LockToken
impl Send for LockToken
impl Sync for LockToken
impl Unpin for LockToken
impl UnsafeUnpin for LockToken
impl UnwindSafe for LockToken
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.