Function wasmi::memory_units::size_of

source ·
pub fn size_of<T>() -> Bytes
Expand description

Returns the size of a type in Bytes.

Example

#[repr(C)]
struct Hello {
    a: u32,
    b: u32,
}

assert_eq!(size_of::<Hello>(), Bytes(4 + 4));