pub struct TracingWrapper<T> { /* private fields */ }
Expand description
Tracing wrapper for all lock_api
traits.
This wrapper implements any of the locking traits available, given that the wrapped type implements them. As such, this wrapper can be used both for normal mutexes and rwlocks.
Trait Implementations§
Source§impl<T: Debug> Debug for TracingWrapper<T>
impl<T: Debug> Debug for TracingWrapper<T>
Source§impl<T: Default> Default for TracingWrapper<T>
impl<T: Default> Default for TracingWrapper<T>
Source§fn default() -> TracingWrapper<T>
fn default() -> TracingWrapper<T>
Returns the “default value” for a type. Read more
Source§impl<T> RawMutex for TracingWrapper<T>where
T: RawMutex,
impl<T> RawMutex for TracingWrapper<T>where
T: RawMutex,
Source§type GuardMarker = GuardNoSend
type GuardMarker = GuardNoSend
Always equal to GuardNoSend
, as an implementation detail in the tracking system requires
this behaviour. May change in the future to reflect the actual guard type from the wrapped
primitive.
Source§impl<T> RawMutexFair for TracingWrapper<T>where
T: RawMutexFair,
impl<T> RawMutexFair for TracingWrapper<T>where
T: RawMutexFair,
Source§impl<T> RawMutexTimed for TracingWrapper<T>where
T: RawMutexTimed,
impl<T> RawMutexTimed for TracingWrapper<T>where
T: RawMutexTimed,
Source§type Duration = <T as RawMutexTimed>::Duration
type Duration = <T as RawMutexTimed>::Duration
Duration type used for
try_lock_for
.Source§type Instant = <T as RawMutexTimed>::Instant
type Instant = <T as RawMutexTimed>::Instant
Instant type used for
try_lock_until
.Source§fn try_lock_for(&self, timeout: Self::Duration) -> bool
fn try_lock_for(&self, timeout: Self::Duration) -> bool
Attempts to acquire this lock until a timeout is reached.
Source§fn try_lock_until(&self, timeout: Self::Instant) -> bool
fn try_lock_until(&self, timeout: Self::Instant) -> bool
Attempts to acquire this lock until a timeout is reached.
Source§impl<T> RawRwLock for TracingWrapper<T>where
T: RawRwLock,
impl<T> RawRwLock for TracingWrapper<T>where
T: RawRwLock,
Source§type GuardMarker = GuardNoSend
type GuardMarker = GuardNoSend
Always equal to GuardNoSend
, as an implementation detail in the tracking system requires
this behaviour. May change in the future to reflect the actual guard type from the wrapped
primitive.
Acquires a shared lock, blocking the current thread until it is able to do so.
Attempts to acquire a shared lock without blocking.
Releases a shared lock. Read more
Source§fn lock_exclusive(&self)
fn lock_exclusive(&self)
Acquires an exclusive lock, blocking the current thread until it is able to do so.
Source§fn try_lock_exclusive(&self) -> bool
fn try_lock_exclusive(&self) -> bool
Attempts to acquire an exclusive lock without blocking.
Source§unsafe fn unlock_exclusive(&self)
unsafe fn unlock_exclusive(&self)
Releases an exclusive lock. Read more
Source§fn is_locked_exclusive(&self) -> bool
fn is_locked_exclusive(&self) -> bool
Check if this
RwLock
is currently exclusively locked.Source§impl<T> RawRwLockDowngrade for TracingWrapper<T>where
T: RawRwLockDowngrade,
impl<T> RawRwLockDowngrade for TracingWrapper<T>where
T: RawRwLockDowngrade,
Source§impl<T> RawRwLockFair for TracingWrapper<T>where
T: RawRwLockFair,
impl<T> RawRwLockFair for TracingWrapper<T>where
T: RawRwLockFair,
Releases a shared lock using a fair unlock protocol. Read more
Source§unsafe fn unlock_exclusive_fair(&self)
unsafe fn unlock_exclusive_fair(&self)
Releases an exclusive lock using a fair unlock protocol. Read more
Temporarily yields a shared lock to a waiting thread if there is one. Read more
Source§unsafe fn bump_exclusive(&self)
unsafe fn bump_exclusive(&self)
Temporarily yields an exclusive lock to a waiting thread if there is one. Read more
Source§impl<T> RawRwLockRecursive for TracingWrapper<T>where
T: RawRwLockRecursive,
impl<T> RawRwLockRecursive for TracingWrapper<T>where
T: RawRwLockRecursive,
Acquires a shared lock without deadlocking in case of a recursive lock.
Attempts to acquire a shared lock without deadlocking in case of a recursive lock.
Source§impl<T> RawRwLockRecursiveTimed for TracingWrapper<T>where
T: RawRwLockRecursiveTimed,
impl<T> RawRwLockRecursiveTimed for TracingWrapper<T>where
T: RawRwLockRecursiveTimed,
Attempts to acquire a shared lock until a timeout is reached, without
deadlocking in case of a recursive lock.
Attempts to acquire a shared lock until a timeout is reached, without
deadlocking in case of a recursive lock.
Source§impl<T> RawRwLockTimed for TracingWrapper<T>where
T: RawRwLockTimed,
impl<T> RawRwLockTimed for TracingWrapper<T>where
T: RawRwLockTimed,
Source§type Duration = <T as RawRwLockTimed>::Duration
type Duration = <T as RawRwLockTimed>::Duration
Duration type used for
try_lock_for
.Source§type Instant = <T as RawRwLockTimed>::Instant
type Instant = <T as RawRwLockTimed>::Instant
Instant type used for
try_lock_until
.Attempts to acquire a shared lock until a timeout is reached.
Attempts to acquire a shared lock until a timeout is reached.
Source§fn try_lock_exclusive_for(&self, timeout: Self::Duration) -> bool
fn try_lock_exclusive_for(&self, timeout: Self::Duration) -> bool
Attempts to acquire an exclusive lock until a timeout is reached.
Source§fn try_lock_exclusive_until(&self, timeout: Self::Instant) -> bool
fn try_lock_exclusive_until(&self, timeout: Self::Instant) -> bool
Attempts to acquire an exclusive lock until a timeout is reached.
Source§impl<T> RawRwLockUpgrade for TracingWrapper<T>where
T: RawRwLockUpgrade,
impl<T> RawRwLockUpgrade for TracingWrapper<T>where
T: RawRwLockUpgrade,
Source§fn lock_upgradable(&self)
fn lock_upgradable(&self)
Acquires an upgradable lock, blocking the current thread until it is able to do so.
Source§fn try_lock_upgradable(&self) -> bool
fn try_lock_upgradable(&self) -> bool
Attempts to acquire an upgradable lock without blocking.
Source§unsafe fn unlock_upgradable(&self)
unsafe fn unlock_upgradable(&self)
Releases an upgradable lock. Read more
Source§unsafe fn try_upgrade(&self) -> bool
unsafe fn try_upgrade(&self) -> bool
Attempts to upgrade an upgradable lock to an exclusive lock without
blocking. Read more
Source§impl<T> RawRwLockUpgradeDowngrade for TracingWrapper<T>where
T: RawRwLockUpgradeDowngrade,
impl<T> RawRwLockUpgradeDowngrade for TracingWrapper<T>where
T: RawRwLockUpgradeDowngrade,
Source§unsafe fn downgrade_upgradable(&self)
unsafe fn downgrade_upgradable(&self)
Downgrades an upgradable lock to a shared lock. Read more
Source§unsafe fn downgrade_to_upgradable(&self)
unsafe fn downgrade_to_upgradable(&self)
Downgrades an exclusive lock to an upgradable lock. Read more
Source§impl<T> RawRwLockUpgradeFair for TracingWrapper<T>where
T: RawRwLockUpgradeFair,
impl<T> RawRwLockUpgradeFair for TracingWrapper<T>where
T: RawRwLockUpgradeFair,
Source§unsafe fn unlock_upgradable_fair(&self)
unsafe fn unlock_upgradable_fair(&self)
Releases an upgradable lock using a fair unlock protocol. Read more
Source§unsafe fn bump_upgradable(&self)
unsafe fn bump_upgradable(&self)
Temporarily yields an upgradable lock to a waiting thread if there is one. Read more
Source§impl<T> RawRwLockUpgradeTimed for TracingWrapper<T>where
T: RawRwLockUpgradeTimed,
impl<T> RawRwLockUpgradeTimed for TracingWrapper<T>where
T: RawRwLockUpgradeTimed,
Source§fn try_lock_upgradable_for(&self, timeout: Self::Duration) -> bool
fn try_lock_upgradable_for(&self, timeout: Self::Duration) -> bool
Attempts to acquire an upgradable lock until a timeout is reached.
Source§fn try_lock_upgradable_until(&self, timeout: Self::Instant) -> bool
fn try_lock_upgradable_until(&self, timeout: Self::Instant) -> bool
Attempts to acquire an upgradable lock until a timeout is reached.
Auto Trait Implementations§
impl<T> !Freeze for TracingWrapper<T>
impl<T> RefUnwindSafe for TracingWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for TracingWrapper<T>where
T: Send,
impl<T> Sync for TracingWrapper<T>where
T: Sync,
impl<T> Unpin for TracingWrapper<T>where
T: Unpin,
impl<T> UnwindSafe for TracingWrapper<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