Struct tracing_mutex::stdsync::TracingRwLock
source · [−]pub struct TracingRwLock<T> { /* private fields */ }Expand description
Wrapper for std::sync::RwLock.
Implementations
sourceimpl<T> TracingRwLock<T>
impl<T> TracingRwLock<T>
pub fn new(t: T) -> Self
sourcepub fn read(&self) -> LockResult<TracingReadGuard<'_, T>>
pub fn read(&self) -> LockResult<TracingReadGuard<'_, T>>
Wrapper for std::sync::RwLock::read.
Panics
This method participates in lock dependency tracking. If acquiring this lock introduces a dependency cycle, this method will panic.
sourcepub fn write(&self) -> LockResult<TracingWriteGuard<'_, T>>
pub fn write(&self) -> LockResult<TracingWriteGuard<'_, T>>
Wrapper for std::sync::RwLock::write.
Panics
This method participates in lock dependency tracking. If acquiring this lock introduces a dependency cycle, this method will panic.
sourcepub fn try_read(&self) -> TryLockResult<TracingReadGuard<'_, T>>
pub fn try_read(&self) -> TryLockResult<TracingReadGuard<'_, T>>
Wrapper for std::sync::RwLock::try_read.
Panics
This method participates in lock dependency tracking. If acquiring this lock introduces a dependency cycle, this method will panic.
sourcepub fn try_write(&self) -> TryLockResult<TracingWriteGuard<'_, T>>
pub fn try_write(&self) -> TryLockResult<TracingWriteGuard<'_, T>>
Wrapper for std::sync::RwLock::try_write.
Panics
This method participates in lock dependency tracking. If acquiring this lock introduces a dependency cycle, this method will panic.
sourcepub fn get_mut(&mut self) -> LockResult<&mut T>
pub fn get_mut(&mut self) -> LockResult<&mut T>
Return a mutable reference to the underlying data.
This method does not block as the locking is handled compile-time by the type system.
sourcepub fn into_inner(self) -> LockResult<T>
pub fn into_inner(self) -> LockResult<T>
Unwrap the mutex and return its inner value.
Trait Implementations
sourceimpl<T: Debug> Debug for TracingRwLock<T>
impl<T: Debug> Debug for TracingRwLock<T>
sourceimpl<T: Default> Default for TracingRwLock<T>
impl<T: Default> Default for TracingRwLock<T>
sourcefn default() -> TracingRwLock<T>
fn default() -> TracingRwLock<T>
Returns the “default value” for a type. Read more
sourceimpl<T> From<T> for TracingRwLock<T>
impl<T> From<T> for TracingRwLock<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for TracingRwLock<T>
impl<T> Send for TracingRwLock<T> where
T: Send,
impl<T> Sync for TracingRwLock<T> where
T: Send + Sync,
impl<T> Unpin for TracingRwLock<T> where
T: Unpin,
impl<T> UnwindSafe for TracingRwLock<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more