Struct raui::prelude::State [−][src]
Implementations
impl<'a> State<'a>
[src]
pub fn new(data: &'a Props, update: StateUpdate) -> State<'a>
[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,
F: FnMut(&T) -> R,
R: Default,
[src]
T: 'static + PropsData,
F: FnMut(&T) -> R,
R: Default,
pub fn map_or_else<T, R, F, E>(&self, f: F, e: E) -> R where
E: FnMut() -> R,
T: 'static + PropsData,
F: FnMut(&T) -> R,
[src]
E: FnMut() -> R,
T: 'static + PropsData,
F: FnMut(&T) -> 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 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),
pub fn update(&self) -> &StateUpdate
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for State<'a>
impl<'a> Send for State<'a>
impl<'a> !Sync for State<'a>
impl<'a> Unpin for State<'a>
impl<'a> !UnwindSafe for State<'a>
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,