ByteSize

Trait ByteSize 

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ByteSize for Bytes

Source§

impl ByteSize for memory_units::target::Pages

Source§

impl ByteSize for memory_units::target::Words

Source§

impl ByteSize for memory_units::wasm32::Pages

Source§

impl ByteSize for memory_units::wasm32::Words