[][src]Function attr_of::size_of

pub const fn size_of<T>(_: &T) -> usize

Returns the size of T.

use attr_of::size_of;
assert_eq!(size_of(&1i64), 8);
assert_eq!(size_of(&()), 0);