pub struct RwStore<S, M> { /* private fields */ }Expand description
Writable store backed by RwLock. Readers use Self::read_store.
Implementations§
Source§impl<S, M> RwStore<S, M>
impl<S, M> RwStore<S, M>
pub fn send(&self, action: M) -> StoreTask
pub fn dispatch(&self, action: M)
pub fn state(&self) -> S
pub fn binding(&self) -> RwStateBinding<S>
Sourcepub fn read_store(&self) -> ReadStore<S, M>
pub fn read_store(&self) -> ReadStore<S, M>
Read-only view for concurrent read() — obtain per reader thread from one RwStore.
pub fn cancel(&self, id: EffectId)
pub fn subscribe_state(&self) -> RwStateSubscriber<S>
pub fn subscribe_changes(&self) -> RwChangeSubscriber<S>
pub fn scope<CS, CM, AK, SK>( &self, state_kp: SK, action_kp: AK, ) -> ScopedRwStore<S, M, CS, CM, AK, SK>
Trait Implementations§
Auto Trait Implementations§
impl<S, M> !RefUnwindSafe for RwStore<S, M>
impl<S, M> !UnwindSafe for RwStore<S, M>
impl<S, M> Freeze for RwStore<S, M>
impl<S, M> Send for RwStore<S, M>
impl<S, M> Sync for RwStore<S, M>
impl<S, M> Unpin for RwStore<S, M>
impl<S, M> UnsafeUnpin for RwStore<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