pub struct DefaultToken(/* private fields */);Trait Implementations§
source§impl TokenTrait for DefaultToken
impl TokenTrait for DefaultToken
type ConstructionError = Infallible
type RunError = Infallible
type Identifier = u16
type ComparisonError = IdMismatch
source§fn new() -> Result<Self, Self::ConstructionError>
fn new() -> Result<Self, Self::ConstructionError>
Constructs a new Token.
source§fn with_token<R, F: FnOnce(Self) -> R>(f: F) -> Result<R, Self::RunError>
fn with_token<R, F: FnOnce(Self) -> R>(f: F) -> Result<R, Self::RunError>
Constructs a new Token, and provides it to the closure. Read more
source§fn identifier(&self) -> Self::Identifier
fn identifier(&self) -> Self::Identifier
Returns the Token’s identifier, which cells may store to allow comparison.
source§fn compare(&self, id: &Self::Identifier) -> Result<(), Self::ComparisonError>
fn compare(&self, id: &Self::Identifier) -> Result<(), Self::ComparisonError>
Allows the cell to compare its identifier to the Token.
Auto Trait Implementations§
impl Freeze for DefaultToken
impl RefUnwindSafe for DefaultToken
impl Send for DefaultToken
impl Sync for DefaultToken
impl Unpin for DefaultToken
impl UnwindSafe for DefaultToken
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more