pub struct SharedState<V> { /* private fields */ }Expand description
A value in the SharedStateMap that provides read and write access.
Implementations§
Sourcepub fn read(&self) -> RwLockReadGuard<'_, V>
pub fn read(&self) -> RwLockReadGuard<'_, V>
Acquires a read lock on the value, returning a read guard.
Sourcepub fn write(&self) -> RwLockWriteGuard<'_, V>
pub fn write(&self) -> RwLockWriteGuard<'_, V>
Acquires a write lock on the value, returning a write guard.
Auto Trait Implementations§
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