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

Gets the value held by the cell.

Calls f with a reference to the contents of the cell.

Calls f with a mutable reference to the contents of the cell.

Implementors