pub struct AllocationHistoryManager { /* private fields */ }
Expand description
Allocation history manager for separate storage of detailed history
Implementations§
Source§impl AllocationHistoryManager
impl AllocationHistoryManager
Sourcepub fn with_config(config: BoundedStatsConfig) -> Self
pub fn with_config(config: BoundedStatsConfig) -> Self
Create new history manager with custom configuration
Sourcepub fn add_allocation(&mut self, alloc: AllocationInfo)
pub fn add_allocation(&mut self, alloc: AllocationInfo)
Add allocation to history
Sourcepub fn get_history(&self) -> &VecDeque<AllocationInfo>
pub fn get_history(&self) -> &VecDeque<AllocationInfo>
Get all history entries
Sourcepub fn get_history_vec(&self) -> Vec<AllocationInfo>
pub fn get_history_vec(&self) -> Vec<AllocationInfo>
Get history as Vec for compatibility
Sourcepub fn get_memory_usage(&self) -> usize
pub fn get_memory_usage(&self) -> usize
Get memory usage of this history manager
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AllocationHistoryManager
impl RefUnwindSafe for AllocationHistoryManager
impl Send for AllocationHistoryManager
impl Sync for AllocationHistoryManager
impl Unpin for AllocationHistoryManager
impl UnwindSafe for AllocationHistoryManager
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