pub struct GlobalMemoryStatsRegistry { /* private fields */ }Expand description
Global memory statistics registry
Implementations§
Source§impl GlobalMemoryStatsRegistry
impl GlobalMemoryStatsRegistry
Sourcepub fn get_or_create_tracker(
&self,
device: Device,
) -> RwLockReadGuard<'_, MemoryStatsTracker>
pub fn get_or_create_tracker( &self, device: Device, ) -> RwLockReadGuard<'_, MemoryStatsTracker>
Get or create tracker for device
Sourcepub fn get_stats(&self, device: Device) -> Option<DetailedMemoryStats>
pub fn get_stats(&self, device: Device) -> Option<DetailedMemoryStats>
Get stats for device
Sourcepub fn get_all_stats(&self) -> Vec<DetailedMemoryStats>
pub fn get_all_stats(&self) -> Vec<DetailedMemoryStats>
Get stats for all devices
Sourcepub fn reset_stats(&self, device: Device)
pub fn reset_stats(&self, device: Device)
Reset stats for device
Sourcepub fn reset_all_stats(&self)
pub fn reset_all_stats(&self)
Reset all stats
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GlobalMemoryStatsRegistry
impl !RefUnwindSafe for GlobalMemoryStatsRegistry
impl Send for GlobalMemoryStatsRegistry
impl Sync for GlobalMemoryStatsRegistry
impl Unpin for GlobalMemoryStatsRegistry
impl UnsafeUnpin for GlobalMemoryStatsRegistry
impl UnwindSafe for GlobalMemoryStatsRegistry
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