Struct raui::prelude::DataBinding [−][src]
Implementations
impl<T> DataBinding<T> where
T: Debug + Default + Send + Sync,
[src]
T: Debug + Default + Send + Sync,
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]
F: FnMut(&T) -> R,
pub fn read_cloned(&self) -> Option<T> where
T: Clone,
[src]
T: Clone,
pub fn read_cloned_or_default(&self) -> T where
T: Clone,
[src]
T: Clone,
pub fn mutate<F, R>(&mut self, f: F) -> Option<R> where
F: FnMut(&mut T) -> R,
[src]
F: FnMut(&mut T) -> R,
pub fn write(&mut self, v: T)
[src]
Trait Implementations
impl<T> Clone for DataBinding<T> where
T: Clone + Debug + Default + Send + Sync,
[src]
T: Clone + Debug + Default + Send + Sync,
pub fn clone(&self) -> DataBinding<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for DataBinding<T> where
T: Debug + Default + Send + Sync,
[src]
T: Debug + Default + Send + Sync,
impl<T> Default for DataBinding<T> where
T: Default + Debug + Send + Sync,
[src]
T: Default + Debug + Send + Sync,
pub fn default() -> DataBinding<T>
[src]
impl<'de, T> Deserialize<'de> for DataBinding<T> where
T: Debug + Default + Send + Sync,
[src]
T: Debug + Default + Send + Sync,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<DataBinding<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<DataBinding<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<T> MessageData for DataBinding<T> where
T: 'static + Debug + Default + Send + Sync,
DataBinding<T>: Clone,
[src]
T: 'static + Debug + Default + Send + Sync,
DataBinding<T>: Clone,
pub fn clone_message(&self) -> Box<dyn MessageData + 'static, Global>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
impl<T> Prefab for DataBinding<T> where
T: Debug + Default + Send + Sync,
[src]
T: Debug + Default + Send + Sync,
pub fn from_prefab(data: Value) -> Result<Self, PrefabError>
[src]
pub fn to_prefab(&self) -> Result<Value, PrefabError>
[src]
impl<T> PropsData for DataBinding<T> where
T: 'static + Debug + Default + Send + Sync,
DataBinding<T>: Clone,
[src]
T: 'static + Debug + Default + Send + Sync,
DataBinding<T>: Clone,
pub fn clone_props(&self) -> Box<dyn PropsData + 'static, Global>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
impl<T> Serialize for DataBinding<T> where
T: Debug + Default + Send + Sync,
[src]
T: Debug + Default + Send + Sync,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,