rust size of type code example Example: rust size of type std::mem::size_of::<T>() // i.e. std::mem::size_of::<i32>() returns 4