pub struct ReadStateBinding<S: 'static> { /* private fields */ }Expand description
Read-only binding over RwLock state — many concurrent readers.
Implementations§
Source§impl<S: 'static> ReadStateBinding<S>
impl<S: 'static> ReadStateBinding<S>
pub fn with_read<R>(&self, f: impl FnOnce(&S) -> R) -> R
pub fn project<V, SK>(&self, kp: SK) -> ReadProjectedBinding<S, V, SK>where
SK: RefKpTrait<S, V>,
Trait Implementations§
Source§impl<S: Clone + 'static> Clone for ReadStateBinding<S>
impl<S: Clone + 'static> Clone for ReadStateBinding<S>
Source§fn clone(&self) -> ReadStateBinding<S>
fn clone(&self) -> ReadStateBinding<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<S> !RefUnwindSafe for ReadStateBinding<S>
impl<S> !UnwindSafe for ReadStateBinding<S>
impl<S> Freeze for ReadStateBinding<S>
impl<S> Send for ReadStateBinding<S>
impl<S> Sync for ReadStateBinding<S>
impl<S> Unpin for ReadStateBinding<S>
impl<S> UnsafeUnpin for ReadStateBinding<S>
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