pub struct Store<S: State> { /* private fields */ }Expand description
Store manages state lifecycle with subscriptions and time-travel debugging.
Implementations§
Source§impl<S: State> Store<S>
impl<S: State> Store<S>
Sourcepub fn with_history_limit(initial: S, max_history: usize) -> Self
pub fn with_history_limit(initial: S, max_history: usize) -> Self
Create a store with custom history limit.
Sourcepub fn dispatch(&mut self, msg: S::Message) -> Command<S::Message>
pub fn dispatch(&mut self, msg: S::Message) -> Command<S::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.