Trait enso_flexer::prelude::CellProperty [−][src]
pub trait CellProperty: CellGetter + CellSetter + ItemClone { fn update<F>(&self, f: F) -> Self::Item
where
F: FnOnce(Self::Item) -> Self::Item, { ... } fn modify<F>(&self, f: F) -> Self::Item
where
F: FnOnce(&mut Self::Item), { ... } }
Expand description
Generalization of modify utilities for structures similar to Cell
.
Provided methods
fn update<F>(&self, f: F) -> Self::Item where
F: FnOnce(Self::Item) -> Self::Item,
[src]
F: FnOnce(Self::Item) -> Self::Item,
Expand description
Updates the contained value using a function and returns the new value.
fn modify<F>(&self, f: F) -> Self::Item where
F: FnOnce(&mut Self::Item),
[src]
F: FnOnce(&mut Self::Item),
Expand description
Modifies the contained value using a function and returns the new value.
Implementors
impl<T> CellProperty for T where
T: CellGetter + CellSetter + ItemClone,
[src]
T: CellGetter + CellSetter + ItemClone,