pub struct SmartPointerTracker { /* private fields */ }Implementations§
Source§impl SmartPointerTracker
impl SmartPointerTracker
pub fn new() -> Self
pub fn track_allocation( &mut self, ptr_addr: usize, ptr_type: PointerType, size: usize, inner_type: String, ref_count: Option<usize>, ) -> u64
pub fn track_deallocation(&mut self, ptr_addr: usize) -> Option<PointerInfo>
pub fn update_ref_count(&mut self, ptr_addr: usize, new_count: usize) -> bool
pub fn get_active_count(&self) -> usize
pub fn get_active_by_type(&self, ptr_type: &PointerType) -> Vec<&PointerInfo>
pub fn get_type_stats(&self, ptr_type: &PointerType) -> Option<&TypeStats>
pub fn get_all_type_stats(&self) -> &HashMap<PointerType, TypeStats>
pub fn get_memory_usage_by_type(&self) -> HashMap<PointerType, usize>
pub fn find_long_lived_pointers(&self, threshold_secs: u64) -> Vec<&PointerInfo>
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SmartPointerTracker
impl RefUnwindSafe for SmartPointerTracker
impl Send for SmartPointerTracker
impl Sync for SmartPointerTracker
impl Unpin for SmartPointerTracker
impl UnwindSafe for SmartPointerTracker
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