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§
sourceconst IS_FIXED_SIZE: bool
const IS_FIXED_SIZE: bool
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.