pub struct Store<S>where
S: State,{ /* private fields */ }Expand description
Store manages state lifecycle with subscriptions and time-travel debugging.
Implementations§
Source§impl<S> Store<S>where
S: State,
impl<S> Store<S>where
S: State,
Sourcepub fn with_history_limit(initial: S, max_history: usize) -> Store<S>
pub fn with_history_limit(initial: S, max_history: usize) -> Store<S>
Create a store with custom history limit.
Sourcepub fn dispatch(
&mut self,
msg: <S as State>::Message,
) -> Command<<S as State>::Message>
pub fn dispatch( &mut self, msg: <S as State>::Message, ) -> Command<<S as State>::Message>
Dispatch a message to update state.
Sourcepub fn history_len(&self) -> usize
pub fn history_len(&self) -> usize
Get number of history entries.
Sourcepub fn clear_history(&mut self)
pub fn clear_history(&mut self)
Clear history.
Trait Implementations§
Auto Trait Implementations§
impl<S> !RefUnwindSafe for Store<S>
impl<S> !UnwindSafe for Store<S>
impl<S> Freeze for Store<S>where
S: Freeze,
impl<S> Send for Store<S>
impl<S> Sync for Store<S>
impl<S> Unpin for Store<S>where
S: Unpin,
impl<S> UnsafeUnpin for Store<S>where
S: UnsafeUnpin,
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