pub struct LeakDetector { /* private fields */ }Expand description
Memory leak detector
Implementations§
Source§impl LeakDetector
impl LeakDetector
pub fn new() -> Self
pub fn enable(&mut self)
pub fn disable(&mut self)
pub fn track_allocation(&self, ptr: *mut u8, size: usize)
pub fn track_deallocation(&self, ptr: *mut u8)
pub fn check_leaks(&self) -> Vec<AllocationInfo>
pub fn check_leaks_older_than(&self, duration: Duration) -> Vec<AllocationInfo>
pub fn total_leaked_bytes(&self) -> usize
pub fn clear(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LeakDetector
impl RefUnwindSafe for LeakDetector
impl Send for LeakDetector
impl Sync for LeakDetector
impl Unpin for LeakDetector
impl UnwindSafe for LeakDetector
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> 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