[][src]Trait valerie::Value

pub trait Value {
    fn bind_func(&self, func: Box<dyn FnMut(&str)>);
}

Value trait

Implement this so that the type can be used to bind themselves to attributes.

Required methods

fn bind_func(&self, func: Box<dyn FnMut(&str)>)

The bind_func has to call the func function with the parameter as its own value whenever it is updated. Ignore the repeated calls if your type is not a state variable.

Loading content...

Implementors

impl<T> Value for StateAtomic<T> where
    T: Copy + Display
[src]

impl<T> Value for StateMutex<T> where
    T: Clone + Display
[src]

impl<T> Value for T where
    T: Display
[src]

impl<T, D> Value for StateGeneric<T, D> where
    D: Clone + Display
[src]

Loading content...