Struct TokenMap

Source
pub struct TokenMap<'a, T: ?Sized, U, F: FnOnce(TokenGuard<'a, T, Token>) -> U, Cell: TokenCellTrait<T, Token> + ?Sized, Token: TokenTrait + 'a> { /* private fields */ }

Implementations§

Source§

impl<'a, T: ?Sized, U, F: FnOnce(TokenGuard<'a, T, Token>) -> U, Token: TokenTrait, Cell: TokenCellTrait<T, Token>> TokenMap<'a, T, U, F, Cell, Token>

Source

pub fn try_apply(self, token: &'a Token) -> Result<U, Token::ComparisonError>

Source

pub fn apply(self, token: &'a Token) -> U
where Token: TokenTrait<ComparisonError = Infallible>,

Auto Trait Implementations§

§

impl<'a, T, U, F, Cell, Token> Freeze for TokenMap<'a, T, U, F, Cell, Token>
where F: Freeze, T: ?Sized, Cell: ?Sized,

§

impl<'a, T, U, F, Cell, Token> RefUnwindSafe for TokenMap<'a, T, U, F, Cell, Token>

§

impl<'a, T, U, F, Cell, Token> Send for TokenMap<'a, T, U, F, Cell, Token>
where F: Send, U: Send, Token: Send, T: Sync + ?Sized, Cell: ?Sized,

§

impl<'a, T, U, F, Cell, Token> Sync for TokenMap<'a, T, U, F, Cell, Token>
where F: Sync, U: Sync, Token: Sync, T: Sync + ?Sized, Cell: ?Sized,

§

impl<'a, T, U, F, Cell, Token> Unpin for TokenMap<'a, T, U, F, Cell, Token>
where F: Unpin, U: Unpin, Token: Unpin, T: ?Sized, Cell: ?Sized,

§

impl<'a, T, U, F, Cell, Token> UnwindSafe for TokenMap<'a, T, U, F, Cell, Token>
where F: UnwindSafe, Cell: RefUnwindSafe + ?Sized, U: UnwindSafe, Token: UnwindSafe, T: RefUnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.