write_rwlock

Function write_rwlock 

Source
pub fn write_rwlock<T>(rwlock: &RwLock<T>) -> Option<RwLockWriteGuard<'_, T>>
Expand description

Helper function to write-lock an RwLock and access its value Returns None if the lock is poisoned Note: This returns a guard, not a reference, so it cannot be used in keypaths directly