Struct tokenlock::ArcToken[][src]

pub struct ArcToken(_);

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]

impl PartialEq<ArcToken> for ArcToken[src]

impl StructuralEq for ArcToken[src]

impl StructuralPartialEq for ArcToken[src]

impl Token<ArcTokenId> for ArcToken[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.