pub trait Binding<S>: Clone + Copy + 'static {
    fn get<'a>(&self, cx: &'a Context) -> &'a S;
    fn get_mut<'a>(&self, cx: &'a mut Context) -> &'a mut S;

    fn with<T>(&self, cx: &Context, f: impl FnOnce(&S) -> T) -> T { ... }
    fn with_mut<T>(&self, cx: &mut Context, f: impl FnOnce(&mut S) -> T) -> T { ... }
}
Expand description

Reads or writes a value owned by a source-of-truth.

Required Methods

Provided Methods

Implementors