pub struct TokenMap<'a, T: ?Sized, U, F: FnOnce(TokenGuard<'a, T, Token>) -> U, Cell: TokenCellTrait<T, Token> + ?Sized, Token: TokenTrait + 'a> { /* private fields */ }
Expand description
An operation waiting to be applied onto a cell by providing a proof of immutable access.
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>
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>
Sourcepub fn try_apply(
self,
token: &'a Token,
) -> Result<U, (Self, Token::ComparisonError)>
pub fn try_apply( self, token: &'a Token, ) -> Result<U, (Self, Token::ComparisonError)>
Attempt to apply the operation.
§Errors
If the token comparison failed. Reaching this error is likely to be a fundamental error in your program.
Sourcepub fn apply(self, token: &'a Token) -> Uwhere
Token: TokenTrait<ComparisonError = Infallible>,
pub fn apply(self, token: &'a Token) -> Uwhere
Token: TokenTrait<ComparisonError = Infallible>,
Applies the operation.
Auto Trait Implementations§
impl<'a, T, U, F, Cell, Token> Freeze for TokenMap<'a, T, U, F, Cell, Token>
impl<'a, T, U, F, Cell, Token> RefUnwindSafe for TokenMap<'a, T, U, F, Cell, Token>where
F: RefUnwindSafe,
Cell: RefUnwindSafe + ?Sized,
U: RefUnwindSafe,
Token: RefUnwindSafe,
T: RefUnwindSafe + ?Sized,
impl<'a, T, U, F, Cell, Token> Send for TokenMap<'a, T, U, F, Cell, Token>
impl<'a, T, U, F, Cell, Token> Sync for TokenMap<'a, T, U, F, Cell, Token>
impl<'a, T, U, F, Cell, Token> Unpin for TokenMap<'a, T, U, F, Cell, Token>
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> 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