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