pub struct StateWrapper<State> {
inner: State,
}Expand description
Wraps around State and allows only immutable borrow,
Through StateWrapper::get method.
Mutable borrow of state can only happen in reducer.
Fields§
§inner: StateImplementations§
Source§impl<State> StateWrapper<State>
impl<State> StateWrapper<State>
Trait Implementations§
Auto Trait Implementations§
impl<State> Freeze for StateWrapper<State>where
State: Freeze,
impl<State> RefUnwindSafe for StateWrapper<State>where
State: RefUnwindSafe,
impl<State> Send for StateWrapper<State>where
State: Send,
impl<State> Sync for StateWrapper<State>where
State: Sync,
impl<State> Unpin for StateWrapper<State>where
State: Unpin,
impl<State> UnwindSafe for StateWrapper<State>where
State: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more