pub trait Binding<S>: Clone + 'static {
fn with<T, F: FnOnce(&S) -> T>(&self, f: F) -> T;
fn with_mut<T, F: FnOnce(&mut S) -> T>(&self, f: F) -> T;
fn get(&self) -> S
where
S: Clone,
{ ... }
fn set(&self, value: S) { ... }
}
Expand description
Reads or writes a value owned by a source-of-truth.