pub trait BoundedStorable: Storable {
    const MAX_SIZE: u32;
    const IS_FIXED_SIZE: bool;
}
Expand description

A trait indicating that a Storable element is bounded in size.

Required Associated Constants§

The maximum size, in bytes, of the type when serialized.

True if all the values of this type have fixed-width encoding. Some data structures, such as stable vector, can take advantage of fixed size to avoid storing an explicit entry size.

Examples: little-/big-endian encoding of u16/u32/u64, tuples and arrays of fixed-size types.

Implementations on Foreign Types§

Implementors§