Struct diem_infallible::RwLock
source · pub struct RwLock<T>(_);
Expand description
A simple wrapper around the lock() function of a std::sync::RwLock The only difference is that you don’t need to call unwrap() on it.
Implementations§
source§impl<T> RwLock<T>
impl<T> RwLock<T>
sourcepub fn read(&self) -> RwLockReadGuard<'_, T>
pub fn read(&self) -> RwLockReadGuard<'_, T>
lock the rwlock in read mode
sourcepub fn write(&self) -> RwLockWriteGuard<'_, T>
pub fn write(&self) -> RwLockWriteGuard<'_, T>
lock the rwlock in write mode
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
return the owned type consuming the lock