pub struct OptimizedRwLock<T> { /* private fields */ }
Expand description
Optimized RwLock with performance monitoring
Implementations§
Source§impl<T> OptimizedRwLock<T>
impl<T> OptimizedRwLock<T>
Sourcepub fn read(&self) -> OptimizedRwLockReadGuard<'_, T>
pub fn read(&self) -> OptimizedRwLockReadGuard<'_, T>
Acquire a read lock with performance monitoring
Sourcepub fn write(&self) -> OptimizedRwLockWriteGuard<'_, T>
pub fn write(&self) -> OptimizedRwLockWriteGuard<'_, T>
Acquire a write lock with performance monitoring
Sourcepub fn try_read(&self) -> Option<OptimizedRwLockReadGuard<'_, T>>
pub fn try_read(&self) -> Option<OptimizedRwLockReadGuard<'_, T>>
Try to acquire a read lock without blocking
Sourcepub fn try_write(&self) -> Option<OptimizedRwLockWriteGuard<'_, T>>
pub fn try_write(&self) -> Option<OptimizedRwLockWriteGuard<'_, T>>
Try to acquire a write lock without blocking
Sourcepub fn performance_stats(&self) -> PerformanceSnapshot
pub fn performance_stats(&self) -> PerformanceSnapshot
Get performance statistics for this RwLock
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for OptimizedRwLock<T>
impl<T> !RefUnwindSafe for OptimizedRwLock<T>
impl<T> Send for OptimizedRwLock<T>where
T: Send,
impl<T> Sync for OptimizedRwLock<T>
impl<T> Unpin for OptimizedRwLock<T>where
T: Unpin,
impl<T> UnwindSafe for OptimizedRwLock<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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more