Function std::mem::align_of [] [src]

pub fn align_of<T>() -> usize

Returns the alignment in memory for a type.

This is the alignment used for struct fields. It may be smaller than the preferred alignment.

Examples

fn main() { use std::mem; assert_eq!(4, mem::align_of::<i32>()); }
use std::mem;

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