pub trait ByteSize {
    const BYTE_SIZE: Bytes;
}
Expand description

A trait defining the size, in bytes, of one unit of Self.

Example

println!("The size of one word in bytes is {}.", Words::BYTE_SIZE.0);

Required Associated Constants§

source

const BYTE_SIZE: Bytes

The size, in bytes, of a single unit of Self.

Implementors§

source§

impl ByteSize for memory_units::target::Pages

source§

const BYTE_SIZE: Bytes = Bytes(4096)

source§

impl ByteSize for memory_units::target::Words

source§

const BYTE_SIZE: Bytes = Bytes(mem::size_of::<usize>())

source§

impl ByteSize for Bytes

source§

const BYTE_SIZE: Bytes = Bytes(1)

source§

impl ByteSize for wasmi_core::memory_units::Pages

source§

const BYTE_SIZE: Bytes = Bytes(65536)

source§

impl ByteSize for wasmi_core::memory_units::Words

source§

const BYTE_SIZE: Bytes = Bytes(4)