WithBound

Trait WithBound 

Source
pub trait WithBound<Value>:
    Changeable
    + Send
    + Sync {
    // Required methods
    fn with_ref<F, T>(&self, f: F) -> T
       where F: FnOnce(&Value) -> T;
    fn with_mut<F>(&self, f: F)
       where F: FnOnce(&mut Value) -> bool;
}
Expand description

Trait implemented by something that is bound to a value

Required Methods§

Source

fn with_ref<F, T>(&self, f: F) -> T
where F: FnOnce(&Value) -> T,

Mutate instead of replacing value stored in this binding, return true to send notifiations

Source

fn with_mut<F>(&self, f: F)
where F: FnOnce(&mut Value) -> bool,

Mutate instead of replacing value stored in this binding, return true to send notifiations

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Value: 'static + Clone + PartialEq + Send> WithBound<Value> for Binding<Value>