pub struct LockDepRwLock<T, L> { /* private fields */ }Expand description
An RwLock that dynamically enforces lock ordering at runtime using types for levels.
Implementations§
Source§impl<T, L: LockLevel> LockDepRwLock<T, L>
impl<T, L: LockLevel> LockDepRwLock<T, L>
pub const fn new(value: T) -> Self
Sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Returns a mutable reference to the underlying data.
Since this call borrows the LockDepRwLock mutably, no actual locking takes place – the
borrow checker statically ensures no other threads have access to the LockDepRwLock.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the LockDepRwLock, returning the underlying data.
pub fn read(&self) -> LockDepReadGuard<'_, T>
pub fn write(&self) -> LockDepWriteGuard<'_, T>
Trait Implementations§
Source§impl<T: Debug, L> Debug for LockDepRwLock<T, L>
impl<T: Debug, L> Debug for LockDepRwLock<T, L>
Auto Trait Implementations§
impl<T, L> !Freeze for LockDepRwLock<T, L>
impl<T, L> !RefUnwindSafe for LockDepRwLock<T, L>
impl<T, L> Send for LockDepRwLock<T, L>
impl<T, L> Sync for LockDepRwLock<T, L>
impl<T, L> Unpin for LockDepRwLock<T, L>
impl<T, L> UnsafeUnpin for LockDepRwLock<T, L>where
T: UnsafeUnpin,
impl<T, L> UnwindSafe for LockDepRwLock<T, L>where
L: UnwindSafe,
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