[−][src]Trait parity_util_mem::MallocSizeOf
Trait for measuring the "deep" heap usage of a data structure. This is the most commonly-used of the traits.
Required methods
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
Implementations on Foreign Types
impl<T: MallocSizeOf> MallocSizeOf for Arc<T>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl MallocSizeOf for String
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<'a, T: ?Sized> MallocSizeOf for &'a T
[src]
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf + ?Sized> MallocSizeOf for Box<T>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl MallocSizeOf for ()
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf> MallocSizeOf for (TupleElement0,)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf, TupleElement4: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf, TupleElement4: MallocSizeOf, TupleElement5: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf, TupleElement4: MallocSizeOf, TupleElement5: MallocSizeOf, TupleElement6: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf, TupleElement4: MallocSizeOf, TupleElement5: MallocSizeOf, TupleElement6: MallocSizeOf, TupleElement7: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf, TupleElement4: MallocSizeOf, TupleElement5: MallocSizeOf, TupleElement6: MallocSizeOf, TupleElement7: MallocSizeOf, TupleElement8: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf, TupleElement4: MallocSizeOf, TupleElement5: MallocSizeOf, TupleElement6: MallocSizeOf, TupleElement7: MallocSizeOf, TupleElement8: MallocSizeOf, TupleElement9: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf, TupleElement4: MallocSizeOf, TupleElement5: MallocSizeOf, TupleElement6: MallocSizeOf, TupleElement7: MallocSizeOf, TupleElement8: MallocSizeOf, TupleElement9: MallocSizeOf, TupleElement10: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<TupleElement0: MallocSizeOf, TupleElement1: MallocSizeOf, TupleElement2: MallocSizeOf, TupleElement3: MallocSizeOf, TupleElement4: MallocSizeOf, TupleElement5: MallocSizeOf, TupleElement6: MallocSizeOf, TupleElement7: MallocSizeOf, TupleElement8: MallocSizeOf, TupleElement9: MallocSizeOf, TupleElement10: MallocSizeOf, TupleElement11: MallocSizeOf> MallocSizeOf for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9, TupleElement10, TupleElement11)
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf> MallocSizeOf for Option<T>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf, E: MallocSizeOf> MallocSizeOf for Result<T, E>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf + Copy> MallocSizeOf for Cell<T>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf> MallocSizeOf for RefCell<T>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<'a, B: ?Sized + ToOwned> MallocSizeOf for Cow<'a, B> where
B::Owned: MallocSizeOf,
[src]
B::Owned: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf> MallocSizeOf for [T]
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf> MallocSizeOf for Vec<T>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf> MallocSizeOf for VecDeque<T>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T, S> MallocSizeOf for HashSet<T, S> where
T: Eq + Hash + MallocSizeOf,
S: BuildHasher,
[src]
T: Eq + Hash + MallocSizeOf,
S: BuildHasher,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<I: MallocSizeOf> MallocSizeOf for Reverse<I>
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<K, V, S> MallocSizeOf for HashMap<K, V, S> where
K: MallocSizeOf,
V: MallocSizeOf,
[src]
K: MallocSizeOf,
V: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<K, V> MallocSizeOf for BTreeMap<K, V> where
K: MallocSizeOf,
V: MallocSizeOf,
[src]
K: MallocSizeOf,
V: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T> MallocSizeOf for BTreeSet<T> where
T: MallocSizeOf,
[src]
T: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T> MallocSizeOf for PhantomData<T>
[src]
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
[src]
impl<T: MallocSizeOf> MallocSizeOf for Mutex<T>
[src]
If a mutex is stored directly as a member of a data type that is being measured, it is the unique owner of its contents and deserves to be measured.
If a mutex is stored inside of an Arc value as a member of a data type that is being measured, the Arc will not be automatically measured so there is no risk of overcounting the mutex's contents.
The same reasoning applies to RwLock.