Trait servo_malloc_size_of::MallocSizeOf
source · pub trait MallocSizeOf {
// Required method
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize;
}
Expand description
Trait for measuring the “deep” heap usage of a data structure. This is the most commonly-used of the traits.
Required Methods§
sourcefn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
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§
source§impl MallocSizeOf for Destination
impl MallocSizeOf for Destination
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Key
impl MallocSizeOf for Key
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for AttrValue
impl MallocSizeOf for AttrValue
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for T
impl MallocSizeOf for T
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for PseudoElement
impl MallocSizeOf for PseudoElement
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for SingleFontFamily
impl MallocSizeOf for SingleFontFamily
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Host
impl MallocSizeOf for Host
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for BorderStyle
impl MallocSizeOf for BorderStyle
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for BoxShadowClipMode
impl MallocSizeOf for BoxShadowClipMode
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for ExtendMode
impl MallocSizeOf for ExtendMode
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for ImageRendering
impl MallocSizeOf for ImageRendering
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for LineStyle
impl MallocSizeOf for LineStyle
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for MixBlendMode
impl MallocSizeOf for MixBlendMode
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for RepeatMode
impl MallocSizeOf for RepeatMode
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for bool
impl MallocSizeOf for bool
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for char
impl MallocSizeOf for char
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for f32
impl MallocSizeOf for f32
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for f64
impl MallocSizeOf for f64
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for i8
impl MallocSizeOf for i8
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for i16
impl MallocSizeOf for i16
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for i32
impl MallocSizeOf for i32
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for i64
impl MallocSizeOf for i64
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for i128
impl MallocSizeOf for i128
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for isize
impl MallocSizeOf for isize
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for str
impl MallocSizeOf for str
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for u8
impl MallocSizeOf for u8
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for u16
impl MallocSizeOf for u16
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for u32
impl MallocSizeOf for u32
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for u64
impl MallocSizeOf for u64
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for u128
impl MallocSizeOf for u128
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for ()
impl MallocSizeOf for ()
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for usize
impl MallocSizeOf for usize
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Au
impl MallocSizeOf for Au
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for ElementState
impl MallocSizeOf for ElementState
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for StatusCode
impl MallocSizeOf for StatusCode
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Modifiers
impl MallocSizeOf for Modifiers
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for QualName
impl MallocSizeOf for QualName
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for DocumentAnimationSet
impl MallocSizeOf for DocumentAnimationSet
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for AttrIdentifier
impl MallocSizeOf for AttrIdentifier
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for AbsoluteColor
impl MallocSizeOf for AbsoluteColor
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for RestyleHint
impl MallocSizeOf for RestyleHint
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for MediaList
impl MallocSizeOf for MediaList
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Font
impl MallocSizeOf for Font
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for RestyleDamage
impl MallocSizeOf for RestyleDamage
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Snapshot
impl MallocSizeOf for Snapshot
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for DocumentStyleSheet
impl MallocSizeOf for DocumentStyleSheet
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Stylist
impl MallocSizeOf for Stylist
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for FontStretch
impl MallocSizeOf for FontStretch
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for FontStyle
impl MallocSizeOf for FontStyle
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for FontWeight
impl MallocSizeOf for FontWeight
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for OpaqueNode
impl MallocSizeOf for OpaqueNode
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Uuid
impl MallocSizeOf for Uuid
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for ColorF
impl MallocSizeOf for ColorF
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for BorderRadius
impl MallocSizeOf for BorderRadius
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for GradientStop
impl MallocSizeOf for GradientStop
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for NormalBorder
impl MallocSizeOf for NormalBorder
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for FontInstanceKey
impl MallocSizeOf for FontInstanceKey
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for GlyphInstance
impl MallocSizeOf for GlyphInstance
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for ImageKey
impl MallocSizeOf for ImageKey
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for String
impl MallocSizeOf for String
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<f32>
impl MallocSizeOf for Range<f32>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<f64>
impl MallocSizeOf for Range<f64>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<i8>
impl MallocSizeOf for Range<i8>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<i16>
impl MallocSizeOf for Range<i16>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<i32>
impl MallocSizeOf for Range<i32>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<i64>
impl MallocSizeOf for Range<i64>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<isize>
impl MallocSizeOf for Range<isize>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<u8>
impl MallocSizeOf for Range<u8>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<u16>
impl MallocSizeOf for Range<u16>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<u32>
impl MallocSizeOf for Range<u32>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<u64>
impl MallocSizeOf for Range<u64>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Range<usize>
impl MallocSizeOf for Range<usize>
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for AtomicBool
impl MallocSizeOf for AtomicBool
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for AtomicIsize
impl MallocSizeOf for AtomicIsize
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for AtomicUsize
impl MallocSizeOf for AtomicUsize
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Duration
impl MallocSizeOf for Duration
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for Instant
impl MallocSizeOf for Instant
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for SystemTime
impl MallocSizeOf for SystemTime
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for NonZeroU64
impl MallocSizeOf for NonZeroU64
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl MallocSizeOf for NonZeroUsize
impl MallocSizeOf for NonZeroUsize
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
source§impl<'a, B: ?Sized + ToOwned> MallocSizeOf for Cow<'a, B>where
B::Owned: MallocSizeOf,
impl<'a, B: ?Sized + ToOwned> MallocSizeOf for Cow<'a, B>where
B::Owned: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<'a, T: ?Sized> MallocSizeOf for &'a T
impl<'a, T: ?Sized> MallocSizeOf for &'a T
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
source§impl<A> MallocSizeOf for SmallVec<A>
impl<A> MallocSizeOf for SmallVec<A>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<K, V> MallocSizeOf for BTreeMap<K, V>
impl<K, V> MallocSizeOf for BTreeMap<K, V>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<K, V, S> MallocSizeOf for IndexMap<K, V, S>
impl<K, V, S> MallocSizeOf for IndexMap<K, V, S>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<K, V, S> MallocSizeOf for HashMap<K, V, S>
impl<K, V, S> MallocSizeOf for HashMap<K, V, S>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<S> MallocSizeOf for GenericAuthorStyles<S>
impl<S> MallocSizeOf for GenericAuthorStyles<S>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<S> MallocSizeOf for DocumentStylesheetSet<S>
impl<S> MallocSizeOf for DocumentStylesheetSet<S>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<Static: StaticAtomSet> MallocSizeOf for Atom<Static>
impl<Static: StaticAtomSet> MallocSizeOf for Atom<Static>
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
source§impl<T1, T2> MallocSizeOf for (T1, T2)where
T1: MallocSizeOf,
T2: MallocSizeOf,
impl<T1, T2> MallocSizeOf for (T1, T2)where
T1: MallocSizeOf,
T2: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T1, T2, T3> MallocSizeOf for (T1, T2, T3)
impl<T1, T2, T3> MallocSizeOf for (T1, T2, T3)
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T1, T2, T3, T4> MallocSizeOf for (T1, T2, T3, T4)
impl<T1, T2, T3, T4> MallocSizeOf for (T1, T2, T3, T4)
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T> MallocSizeOf for Sender<T>
impl<T> MallocSizeOf for Sender<T>
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
source§impl<T> MallocSizeOf for UnboundedSender<T>
impl<T> MallocSizeOf for UnboundedSender<T>
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
source§impl<T> MallocSizeOf for PhantomData<T>
impl<T> MallocSizeOf for PhantomData<T>
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
source§impl<T, S> MallocSizeOf for IndexSet<T, S>
impl<T, S> MallocSizeOf for IndexSet<T, S>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T, S> MallocSizeOf for HashSet<T, S>
impl<T, S> MallocSizeOf for HashSet<T, S>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf + Copy> MallocSizeOf for Cell<T>
impl<T: MallocSizeOf + Copy> MallocSizeOf for Cell<T>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf + ?Sized> MallocSizeOf for Box<T>
impl<T: MallocSizeOf + ?Sized> MallocSizeOf for Box<T>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf> MallocSizeOf for Option<T>
impl<T: MallocSizeOf> MallocSizeOf for Option<T>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf> MallocSizeOf for [T]
impl<T: MallocSizeOf> MallocSizeOf for [T]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf> MallocSizeOf for RefCell<T>
impl<T: MallocSizeOf> MallocSizeOf for RefCell<T>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf> MallocSizeOf for ThinVec<T>
impl<T: MallocSizeOf> MallocSizeOf for ThinVec<T>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf> MallocSizeOf for VecDeque<T>
impl<T: MallocSizeOf> MallocSizeOf for VecDeque<T>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf> MallocSizeOf for Vec<T>
impl<T: MallocSizeOf> MallocSizeOf for Vec<T>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf> MallocSizeOf for RefCell<T>
impl<T: MallocSizeOf> MallocSizeOf for RefCell<T>
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl<T: MallocSizeOf> MallocSizeOf for Mutex<T>
impl<T: MallocSizeOf> MallocSizeOf for Mutex<T>
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.