Struct tokenlock::arc::ArcTokenId
source · [−]pub struct ArcTokenId(_);
Available on crate feature
alloc
and target_has_atomic="ptr"
only.Expand description
Token that cannot be used to access the contents of a TokenLock
, but can
be used to create a new TokenLock
.
Examples
ArcTokenId
can be cloned while ArcToken
cannot:
let token = ArcToken::new();
let token_id = token.id();
let lock1 = TokenLock::new(token_id.clone(), 1);
let lock2 = TokenLock::new(token_id, 2);
Trait Implementations
sourceimpl Clone for ArcTokenId
impl Clone for ArcTokenId
sourcefn clone(&self) -> ArcTokenId
fn clone(&self) -> ArcTokenId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ArcTokenId
impl Debug for ArcTokenId
sourceimpl Hash for ArcTokenId
impl Hash for ArcTokenId
sourceimpl PartialEq<ArcTokenId> for ArcTokenId
impl PartialEq<ArcTokenId> for ArcTokenId
sourcefn eq(&self, other: &ArcTokenId) -> bool
fn eq(&self, other: &ArcTokenId) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ArcTokenId) -> bool
fn ne(&self, other: &ArcTokenId) -> bool
This method tests for !=
.
sourceimpl Token<ArcTokenId> for ArcToken
impl Token<ArcTokenId> for ArcToken
fn eq_id(&self, id: &ArcTokenId) -> bool
sourceimpl Token<ArcTokenId> for ArcTokenUnsyncRef<'_>
impl Token<ArcTokenId> for ArcTokenUnsyncRef<'_>
fn eq_id(&self, id: &ArcTokenId) -> bool
impl Eq for ArcTokenId
impl StructuralEq for ArcTokenId
impl StructuralPartialEq for ArcTokenId
Auto Trait Implementations
impl RefUnwindSafe for ArcTokenId
impl Send for ArcTokenId
impl Sync for ArcTokenId
impl Unpin for ArcTokenId
impl UnwindSafe for ArcTokenId
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