pub trait HandyRwLock<T: ?Sized> {
// Required methods
fn wl(&self) -> RwLockWriteGuard<'_, T>;
fn rl(&self) -> RwLockReadGuard<'_, T>;
}Expand description
copy from https://github.com/tikv/tikv/blob/b15ea3b1cd766375cb52019e35c195ed797124df/components/tikv_util/src/lib.rs#L171-L186
A handy shortcut to replace RwLock write/read().unwrap() pattern
to shortcut wl and rl.