Struct mergable::Cell [−][src]
pub struct Cell<T, Seq> { /* fields omitted */ }
Implementations
Mutably borrow the cell.
- Note that the following lines are equivalent. The benefit of
borrow_mut()
is for values that are not (cheaply) clonable. -
let mut ctx = crate::Context::default();
let mut ctx = Cell::new(&mut ctx, 0);
- *cell.borrow_mut(ctx) += 1;
- cell.set(ctx, cell.clone() + 1);
-
Trait Implementations
Auto Trait Implementations
impl<T, Seq> RefUnwindSafe for Cell<T, Seq> where
Seq: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, Seq> UnwindSafe for Cell<T, Seq> where
Seq: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more