pub struct RwLock<T>(RwLock<T>);
Expand description
Tuple Fields§
§0: RwLock<T>
Implementations§
Source§impl<T> RwLock<T>
impl<T> RwLock<T>
pub fn new(_rank: LockRank, value: T) -> RwLock<T>
pub fn read(&self) -> RwLockReadGuard<'_, T>
pub fn write(&self) -> RwLockWriteGuard<'_, T>
Sourcepub unsafe fn force_unlock_read(&self, _data: RankData)
pub unsafe fn force_unlock_read(&self, _data: RankData)
Force an read-unlock operation on this lock.
Safety:
- A read lock must be held which is not held by a guard.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for RwLock<T>
impl<T> !RefUnwindSafe for RwLock<T>
impl<T> Send for RwLock<T>where
T: Send,
impl<T> Sync for RwLock<T>
impl<T> Unpin for RwLock<T>where
T: Unpin,
impl<T> UnwindSafe for RwLock<T>where
T: UnwindSafe,
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