Struct tokenlock::ArcToken [−][src]
An Arc
-based unforgeable token used to access the contents of a
TokenLock
.
This type lacks a Clone
implementation to ensure exclusive access to
TokenLock
.
Implementations
impl ArcToken
[src]
pub fn new() -> Self
[src]
pub fn id(&self) -> ArcTokenId
[src]
Construct an ArcTokenId
that equates to self
.
pub fn borrow_as_unsync(&mut self) -> ArcTokenUnsyncRef<'_>
[src]
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 Debug for ArcToken
[src]
impl Default for ArcToken
[src]
impl Eq for ArcToken
[src]
impl Hash for ArcToken
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ArcToken> for ArcToken
[src]
impl StructuralEq for ArcToken
[src]
impl StructuralPartialEq for ArcToken
[src]
impl Token<ArcTokenId> for ArcToken
[src]
fn eq_id(&self, id: &ArcTokenId) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArcToken
[src]
impl Send for ArcToken
[src]
impl Sync for ArcToken
[src]
impl Unpin for ArcToken
[src]
impl UnwindSafe for ArcToken
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,