Trait enso_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]

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]

Modifies the contained value using a function and returns the new value.

Implementors