pub struct ScopeCell<'a, T: Clone> { /* private fields */ }
Expand description
A ScopeCell allows temporary, scope-bound mutations to a value. The underlying
data must implement Copy
so that the original value can be efficiently stored
and restored. Changes made within the ScopeCell’s scope are reverted when the
ScopeCell is dropped.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !Freeze for ScopeCell<'a, T>
impl<'a, T> !RefUnwindSafe for ScopeCell<'a, T>
impl<'a, T> Send for ScopeCell<'a, T>
impl<'a, T> !Sync for ScopeCell<'a, T>
impl<'a, T> Unpin for ScopeCell<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for ScopeCell<'a, T>where
T: RefUnwindSafe + UnwindSafe,
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