Expand description
§Size Of
A crate for measuring the total memory usage of an object at runtime
§Features
size-of has built-in support for many 3rd party crates that can be enabled with feature flags
std: Enables support for the rust standard library (enabled by default, when disabledsize-ofis#![no_std]compatible)derive: Enables support for#[derive(SizeOf)](enabled by default)time: Enables support for thetimecratetime-std: Enables support fortime’sstdfeature
chrono: Enables support for thechronocratehashbrown: Enables support for thehashbrowncratefxhash: Enables support for thefxhashcraterust_decimal: Enables support for therust_decimalcrateordered-float: Enables support for theordered-floatcrateahash: Enables support for theahashcrateahash-std: Enables support forahash’sstdfeature
xxhash-rust: Enables support for thexxhash-rustcratexxhash-xxh32: Enables support forxxhhash-rust’sxxh32featurexxhash-xxh64: Enables support forxxhhash-rust’sxxh64featurexxhash-xxh3: Enables support forxxhhash-rust’sxxh3feature
Structs§
- Context
- The context of a size query, used to keep track of shared pointers and the aggregated totals of seen data
- Human
Bytes - Friendlier formatting for byte values
- Total
Size - Represents the total space taken up by an instance of a variable, including heap allocations
Traits§
- SizeOf
- Types with a size that can be queried at runtime
Functions§
- size_
of_ values - Get the total size of all given values
Derive Macros§
- SizeOf
- Derives the
SizeOftrait for the given item