[−][src]Struct raui_core::state::State
Implementations
impl<'a> State<'a>[src]
pub fn new(data: &'a StateData, update: StateUpdate) -> Self[src]
pub fn read<T>(&self) -> Result<&'a T, StateError> where
T: 'static, [src]
T: 'static,
pub fn map_or_default<T, R, F>(&self, f: F) -> R where
T: 'static,
R: Default,
F: FnMut(&T) -> R, [src]
T: 'static,
R: Default,
F: FnMut(&T) -> R,
pub fn map_or_else<T, R, F, E>(&self, f: F, e: E) -> R where
T: 'static,
F: FnMut(&T) -> R,
E: FnMut() -> R, [src]
T: 'static,
F: FnMut(&T) -> R,
E: FnMut() -> R,
pub fn read_cloned<T>(&self) -> Result<T, StateError> where
T: 'static + Clone, [src]
T: 'static + Clone,
pub fn read_cloned_or_default<T>(&self) -> T where
T: 'static + Clone + Default, [src]
T: 'static + Clone + Default,
pub fn write<T>(&self, data: T) -> Result<(), StateError> where
T: 'static, [src]
T: 'static,
pub fn update(&self) -> &StateUpdate[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for State<'a>[src]
impl<'a> !Send for State<'a>[src]
impl<'a> !Sync for State<'a>[src]
impl<'a> Unpin for State<'a>[src]
impl<'a> !UnwindSafe for State<'a>[src]
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>,