Function std::mem::align_of
[−]
[src]
pub fn align_of<T>() -> usize
Returns the alignment in memory for a type.
This function will return the alignment, in bytes, of a type in memory. If the alignment returned is adhered to, then the type is guaranteed to function properly.
Examples
fn main() { use std::mem; assert_eq!(4, mem::align_of::<i32>()); }use std::mem; assert_eq!(4, mem::align_of::<i32>());