wiwi::mem_use

Trait MemUse

Source
pub trait MemUse {
    // Required methods
    fn mem_use_inline(&self) -> usize;
    fn mem_use_indirect(&self) -> usize;

    // Provided method
    fn mem_use(&self) -> usize { ... }
}

Required Methods§

Source

fn mem_use_inline(&self) -> usize

Calculates inline memory usage (ex. heap usage of a Vec, always 24 bytes on 64-bit architextures)

Source

fn mem_use_indirect(&self) -> usize

Calculates indirect memory usage (ex. heap usage of a Vec)

Provided Methods§

Source

fn mem_use(&self) -> usize

Calculates total memory usage, including inline and indirect,

Implementations on Foreign Types§

Source§

impl MemUse for bool

Source§

impl MemUse for char

Source§

impl MemUse for f32

Source§

impl MemUse for f64

Source§

impl MemUse for i8

Source§

impl MemUse for i16

Source§

impl MemUse for i32

Source§

impl MemUse for i64

Source§

impl MemUse for i128

Source§

impl MemUse for isize

Source§

impl MemUse for str

Source§

impl MemUse for u8

Source§

impl MemUse for u16

Source§

impl MemUse for u32

Source§

impl MemUse for u64

Source§

impl MemUse for u128

Source§

impl MemUse for ()

Source§

impl MemUse for usize

Source§

impl<T> MemUse for &T
where T: ?Sized + MemUse,

Source§

impl<T> MemUse for &mut T
where T: ?Sized + MemUse,

Source§

impl<T> MemUse for [T]
where T: MemUse,

Source§

impl<T: ?Sized> MemUse for *const T

Source§

impl<T: ?Sized> MemUse for *mut T

Implementors§

Source§

impl MemUse for AtomicBool

Source§

impl MemUse for AtomicI8

Source§

impl MemUse for AtomicI16

Source§

impl MemUse for AtomicI32

Source§

impl MemUse for AtomicI64

Source§

impl MemUse for AtomicIsize

Source§

impl MemUse for AtomicU8

Source§

impl MemUse for AtomicU16

Source§

impl MemUse for AtomicU32

Source§

impl MemUse for AtomicU64

Source§

impl MemUse for AtomicUsize

Source§

impl MemUse for NonZero<i8>

Source§

impl MemUse for NonZero<i16>

Source§

impl MemUse for NonZero<i32>

Source§

impl MemUse for NonZero<i64>

Source§

impl MemUse for NonZero<i128>

Source§

impl MemUse for NonZero<isize>

Source§

impl MemUse for NonZero<u8>

Source§

impl MemUse for NonZero<u16>

Source§

impl MemUse for NonZero<u32>

Source§

impl MemUse for NonZero<u64>

Source§

impl MemUse for NonZero<u128>

Source§

impl MemUse for NonZero<usize>

Source§

impl MemUse for PhantomPinned

Source§

impl MemUse for Saturating<i8>

Source§

impl MemUse for Saturating<i16>

Source§

impl MemUse for Saturating<i32>

Source§

impl MemUse for Saturating<i64>

Source§

impl MemUse for Saturating<i128>

Source§

impl MemUse for Saturating<isize>

Source§

impl MemUse for Saturating<u8>

Source§

impl MemUse for Saturating<u16>

Source§

impl MemUse for Saturating<u32>

Source§

impl MemUse for Saturating<u64>

Source§

impl MemUse for Saturating<u128>

Source§

impl MemUse for Saturating<usize>

Source§

impl MemUse for Wrapping<i8>

Source§

impl MemUse for Wrapping<i16>

Source§

impl MemUse for Wrapping<i32>

Source§

impl MemUse for Wrapping<i64>

Source§

impl MemUse for Wrapping<i128>

Source§

impl MemUse for Wrapping<isize>

Source§

impl MemUse for Wrapping<u8>

Source§

impl MemUse for Wrapping<u16>

Source§

impl MemUse for Wrapping<u32>

Source§

impl MemUse for Wrapping<u64>

Source§

impl MemUse for Wrapping<u128>

Source§

impl MemUse for Wrapping<usize>

Source§

impl<T> MemUse for AtomicPtr<T>

Source§

impl<T: ?Sized> MemUse for PhantomData<T>