Function std::mem::size_of1.0.0 [] [src]

pub fn size_of<T>() -> usize

Returns the size of a type in bytes.

More specifically, this is the offset in bytes between successive items of the same type, including alignment padding.

Examples

use std::mem;

assert_eq!(4, mem::size_of::<i32>());Run