Function redox::mem::size_of_val [] [src]

pub fn size_of_val<T>(val: &T) -> usize where T: ?Sized

Returns the size of the type that val points to in bytes.

Examples

use std::mem;

assert_eq!(4, mem::size_of_val(&5i32));