Trait tokenlock::Token[][src]

pub unsafe trait Token<Keyhole> {
    fn eq_id(&self, id: &Keyhole) -> bool;
}

Trait for an unforgeable token used to access the contents of a TokenLock<_, Keyhole>.

A token can "open" a TokenLock only if the token matches the metaphorical keyhole.

Safety

Given two distinct instances of T: Token x and y, x.eq_id(i) && y.eq_id(i) must not be true for any i.

Required methods

fn eq_id(&self, id: &Keyhole) -> bool[src]

Loading content...

Implementors

impl Token<ArcTokenId> for ArcToken[src]

impl Token<ArcTokenId> for ArcTokenUnsyncRef<'_>[src]

impl Token<RcTokenId> for RcToken[src]

impl<Tag: ?Sized, Variant: SingletonTokenVariant> Token<SingletonTokenId<Tag>> for SingletonToken<Tag, Variant>[src]

Loading content...