Struct raui::prelude::DataBinding[][src]

pub struct DataBinding<T> where
    T: Debug + Default + Send + Sync
{ /* fields omitted */ }

Implementations

impl<T> DataBinding<T> where
    T: Debug + Default + Send + Sync
[src]

pub fn new(data: T) -> DataBinding<T>[src]

pub fn new_bound(data: T, notifier: ChangeNotifier) -> DataBinding<T>[src]

pub fn bind(&mut self, notifier: ChangeNotifier)[src]

pub fn unbind(&mut self)[src]

pub fn access<F, R>(&self, f: F) -> Option<R> where
    F: FnMut(&T) -> R, 
[src]

pub fn read_cloned(&self) -> Option<T> where
    T: Clone
[src]

pub fn read_cloned_or_default(&self) -> T where
    T: Clone
[src]

pub fn mutate<F, R>(&mut self, f: F) -> Option<R> where
    F: FnMut(&mut T) -> R, 
[src]

pub fn write(&mut self, v: T)[src]

Trait Implementations

impl<T> Clone for DataBinding<T> where
    T: Clone + Debug + Default + Send + Sync
[src]

impl<T> Debug for DataBinding<T> where
    T: Debug + Default + Send + Sync
[src]

impl<T> Default for DataBinding<T> where
    T: Default + Debug + Send + Sync
[src]

impl<'de, T> Deserialize<'de> for DataBinding<T> where
    T: Debug + Default + Send + Sync
[src]

impl<T> MessageData for DataBinding<T> where
    T: 'static + Debug + Default + Send + Sync,
    DataBinding<T>: Clone
[src]

impl<T> Prefab for DataBinding<T> where
    T: Debug + Default + Send + Sync
[src]

impl<T> PropsData for DataBinding<T> where
    T: 'static + Debug + Default + Send + Sync,
    DataBinding<T>: Clone
[src]

impl<T> Serialize for DataBinding<T> where
    T: Debug + Default + Send + Sync
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for DataBinding<T>

impl<T> Send for DataBinding<T>

impl<T> Sync for DataBinding<T>

impl<T> Unpin for DataBinding<T>

impl<T> UnwindSafe for DataBinding<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.