1 2 3 4 5 6 7 8 9 10 11 12 13
// repurpose.rs // Aldaron's Memory Interface ( ami ) // Copyright 2017 (c) Aldaron's Tech // Copyright 2017 (c) Jeron Lau // Licensed under the MIT LICENSE //! This module is for getting the size of a variable. /// Get the size of type `T`, in bytes. #[inline(always)] pub fn size_of<T>() -> usize { ::core::mem::size_of::<T>() }