pub trait CellExt<T>: Sealed {
// Required methods
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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.