pub struct Store<S, M> { /* private fields */ }Expand description
Implementations§
Source§impl<S, M> Store<S, M>
impl<S, M> Store<S, M>
Sourcepub fn send(&self, action: M) -> StoreTask
pub fn send(&self, action: M) -> StoreTask
Dispatch an action and return a handle that completes when its effects finish.
pub fn state(&self) -> S
Sourcepub fn binding(&self) -> StateBinding<S>
pub fn binding(&self) -> StateBinding<S>
Zero-copy read/write handle to store state (no clone of S).
pub fn cancel(&self, id: EffectId)
Sourcepub fn subscribe_state(&self) -> StateSubscriber<S>
pub fn subscribe_state(&self) -> StateSubscriber<S>
Subscribe to deduplicated Arc state snapshots (skips consecutive equal states).
Sourcepub fn subscribe_changes(&self) -> ChangeSubscriber<S>
pub fn subscribe_changes(&self) -> ChangeSubscriber<S>
Subscribe to field-level change signals without cloning whole state.
Dedup uses root + per-field hashes (FieldDiff); subscribers read changed
fields on demand via keypaths / StateBinding.
Sourcepub fn scope<CS, CM, AK, SK>(
&self,
state_kp: SK,
action_kp: AK,
) -> ScopedStore<S, M, CS, CM, AK, SK>
pub fn scope<CS, CM, AK, SK>( &self, state_kp: SK, action_kp: AK, ) -> ScopedStore<S, M, CS, CM, AK, SK>
Focus a child store via state and action casepaths (see crate::optics).
Trait Implementations§
Auto Trait Implementations§
impl<S, M> !RefUnwindSafe for Store<S, M>
impl<S, M> !UnwindSafe for Store<S, M>
impl<S, M> Freeze for Store<S, M>
impl<S, M> Send for Store<S, M>
impl<S, M> Sync for Store<S, M>
impl<S, M> Unpin for Store<S, M>
impl<S, M> UnsafeUnpin for Store<S, M>
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