pub struct ReadStore<S, M> { /* private fields */ }Expand description
Read-only store handle — many threads can read concurrently.
Implementations§
Source§impl<S, M> ReadStore<S, M>
impl<S, M> ReadStore<S, M>
pub fn with_read<R>(&self, f: impl FnOnce(&S) -> R) -> R
pub fn state(&self) -> S
pub fn read_binding(&self) -> ReadStateBinding<S>
pub fn subscribe_state(&self) -> RwStateSubscriber<S>
pub fn subscribe_changes(&self) -> RwChangeSubscriber<S>
Trait Implementations§
Auto Trait Implementations§
impl<S, M> !RefUnwindSafe for ReadStore<S, M>
impl<S, M> !UnwindSafe for ReadStore<S, M>
impl<S, M> Freeze for ReadStore<S, M>
impl<S, M> Send for ReadStore<S, M>
impl<S, M> Sync for ReadStore<S, M>
impl<S, M> Unpin for ReadStore<S, M>
impl<S, M> UnsafeUnpin for ReadStore<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