Struct tracing_mutex::stdsync::TracingMutex
source · [−]pub struct TracingMutex<T> { /* private fields */ }
Expand description
Wrapper for std::sync::Mutex
.
Refer to the crate-level documentaiton for the differences between this struct and the one it wraps.
Implementations
sourceimpl<T> TracingMutex<T>
impl<T> TracingMutex<T>
sourcepub fn lock(&self) -> LockResult<TracingMutexGuard<'_, T>>
pub fn lock(&self) -> LockResult<TracingMutexGuard<'_, T>>
Wrapper for std::sync::Mutex::lock
.
Panics
This method participates in lock dependency tracking. If acquiring this lock introduces a dependency cycle, this method will panic.
sourcepub fn try_lock(&self) -> TryLockResult<TracingMutexGuard<'_, T>>
pub fn try_lock(&self) -> TryLockResult<TracingMutexGuard<'_, T>>
Wrapper for std::sync::Mutex::try_lock
.
Panics
This method participates in lock dependency tracking. If acquiring this lock introduces a dependency cycle, this method will panic.
sourcepub fn is_poisoned(&self) -> bool
pub fn is_poisoned(&self) -> bool
Wrapper for std::sync::Mutex::is_poisoned
.
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 TracingMutex<T>
impl<T: Debug> Debug for TracingMutex<T>
sourceimpl<T: Default> Default for TracingMutex<T>
impl<T: Default> Default for TracingMutex<T>
sourcefn default() -> TracingMutex<T>
fn default() -> TracingMutex<T>
Returns the “default value” for a type. Read more
sourceimpl<T> From<T> for TracingMutex<T>
impl<T> From<T> for TracingMutex<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for TracingMutex<T>
impl<T> Send for TracingMutex<T> where
T: Send,
impl<T> Sync for TracingMutex<T> where
T: Send,
impl<T> Unpin for TracingMutex<T> where
T: Unpin,
impl<T> UnwindSafe for TracingMutex<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