Struct raui_core::state::State [−][src]
pub struct State<'a> { /* fields omitted */ }
Implementations
impl<'a> State<'a>
[src]
impl<'a> State<'a>
[src]pub fn new(data: &'a Props, update: StateUpdate) -> Self
[src]
pub fn data(&self) -> &Props
[src]
pub fn has<T>(&self) -> bool where
T: 'static + PropsData,
[src]
T: 'static + PropsData,
pub fn read<T>(&self) -> Result<&'a T, StateError> where
T: 'static + PropsData,
[src]
T: 'static + PropsData,
pub fn map_or_default<T, R, F>(&self, f: F) -> R where
T: 'static + PropsData,
R: Default,
F: FnMut(&T) -> R,
[src]
T: 'static + PropsData,
R: Default,
F: FnMut(&T) -> R,
pub fn map_or_else<T, R, F, E>(&self, f: F, e: E) -> R where
T: 'static + PropsData,
F: FnMut(&T) -> R,
E: FnMut() -> R,
[src]
T: 'static + PropsData,
F: FnMut(&T) -> R,
E: FnMut() -> R,
pub fn read_cloned<T>(&self) -> Result<T, StateError> where
T: 'static + PropsData + Clone,
[src]
T: 'static + PropsData + Clone,
pub fn read_cloned_or_default<T>(&self) -> T where
T: 'static + PropsData + Clone + Default,
[src]
T: 'static + PropsData + Clone + Default,
pub fn read_cloned_or_else<T, F>(&self, f: F) -> T where
T: 'static + PropsData + Clone + Default,
F: FnMut() -> T,
[src]
T: 'static + PropsData + Clone + Default,
F: FnMut() -> T,
pub fn write<T>(&self, data: T) -> Result<(), StateError> where
T: 'static + PropsData + Send + Sync,
[src]
T: 'static + PropsData + Send + Sync,
pub fn write_with<T>(&self, data: T) -> Result<(), StateError> where
T: 'static + PropsData + Send + Sync,
[src]
T: 'static + PropsData + Send + Sync,
pub fn write_without<T>(&self) -> Result<(), StateError> where
T: 'static + PropsData + Send + Sync,
[src]
T: 'static + PropsData + Send + Sync,
pub fn mutate<T, F>(&self, f: F) -> Result<(), StateError> where
T: 'static + PropsData + Send + Sync,
F: FnMut(&T) -> T,
[src]
T: 'static + PropsData + Send + Sync,
F: FnMut(&T) -> T,
pub fn mutate_cloned<T, F>(&self, f: F) -> Result<(), StateError> where
T: 'static + PropsData + Send + Sync + Clone,
F: FnMut(&mut T),
[src]
T: 'static + PropsData + Send + Sync + Clone,
F: FnMut(&mut T),