Registry / utility / size-of

size-of

JSON →
library0.1.5rscratesunverified

A crate for measuring the total memory usage of an object.

# Cargo.toml [dependencies] size-of = "0.1.5"
INSTALL
IMPORT
SIG · SIZE-OF
S
size-of
utilityrustv0.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SizeOf
use size_of::SizeOf;

Derives SizeOf for a struct and measures its total memory usage.

use size_of::SizeOf; #[derive(SizeOf)] struct MyStruct { data: Vec<u8>, } let obj = MyStruct { data: vec![0u8; 100] }; println!("Total size: {} bytes", obj.size_of());
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
size-of — cargo add size-of · libregistry