pub struct Context { /* private fields */ }Implementations
sourceimpl Context
impl Context
pub fn new() -> Self
Run the given closure and mark all added allocations as shared
pub fn add_distinct_allocation(&mut self) -> &mut Self
pub fn add_distinct_allocations(&mut self, allocations: usize) -> &mut Self
pub fn add(&mut self, size: usize) -> &mut Self
pub fn add_excess(&mut self, size: usize) -> &mut Self
pub fn add_arraylike(&mut self, len: usize, element_size: usize) -> &mut Self
pub fn add_vectorlike(
&mut self,
len: usize,
capacity: usize,
element_size: usize
) -> &mut Self
pub fn insert_ptr<T: ?Sized>(&mut self, ptr: *const T) -> bool
pub fn add_ptr<T: ?Sized>(&mut self, ptr: *const T) -> &mut Self
pub fn contains_ptr<T: ?Sized>(&self, ptr: *const T) -> bool
pub const fn total_size(&self) -> TotalSize
Trait Implementations
sourceimpl SizeOf for Contextwhere
usize: SizeOf,
bool: SizeOf,
BTreeSet<usize>: SizeOf,
impl SizeOf for Contextwhere
usize: SizeOf,
bool: SizeOf,
BTreeSet<usize>: SizeOf,
sourcefn size_of_children(&self, context: &mut Context)
fn size_of_children(&self, context: &mut Context)
Gets the size of all “children” owned by this value, not including the size of the value itself. Read more
sourcefn size_of_with_context(&self, context: &mut Context)
fn size_of_with_context(&self, context: &mut Context)
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more