Trait Trackable

Source
pub trait Trackable {
    // Required methods
    fn get_heap_ptr(&self) -> Option<usize>;
    fn get_type_name(&self) -> &'static str;
}
Expand description

Trait for types that can be tracked by the memory tracker.

Required Methods§

Source

fn get_heap_ptr(&self) -> Option<usize>

Get the pointer to the heap allocation for this value.

Source

fn get_type_name(&self) -> &'static str

Get the type name for this value.

Implementations on Foreign Types§

Source§

impl Trackable for String

Source§

fn get_heap_ptr(&self) -> Option<usize>

Source§

fn get_type_name(&self) -> &'static str

Source§

impl<T> Trackable for Box<T>

Source§

fn get_heap_ptr(&self) -> Option<usize>

Source§

fn get_type_name(&self) -> &'static str

Source§

impl<T> Trackable for Rc<T>

Source§

fn get_heap_ptr(&self) -> Option<usize>

Source§

fn get_type_name(&self) -> &'static str

Source§

impl<T> Trackable for Arc<T>

Source§

fn get_heap_ptr(&self) -> Option<usize>

Source§

fn get_type_name(&self) -> &'static str

Source§

impl<T> Trackable for Vec<T>

Source§

fn get_heap_ptr(&self) -> Option<usize>

Source§

fn get_type_name(&self) -> &'static str

Implementors§