pub trait CellExt<T>: Sealed {
fn get(&self) -> T
where
T: Clone + Default;
fn with<F, R>(&self, f: F) -> R
where
T: Default,
F: FnOnce(&T) -> R;
fn with_mut<F, R>(&self, f: F) -> R
where
T: Default,
F: FnOnce(&mut T) -> R;
}Expand description
Provides additional methods for non-Copy types.
Required Methods
Calls f with a reference to the contents of the cell.