Trait frame_support::pallet_prelude::MaxEncodedLen[]

pub trait MaxEncodedLen: Encode {
    fn max_encoded_len() -> usize;
}
Expand description

Items implementing MaxEncodedLen have a statically known maximum encoded size.

Some containers, such as BoundedVec, have enforced size limits and this trait can be implemented accurately. Other containers, such as StorageMap, do not have enforced size limits. For those containers, it is necessary to make a documented assumption about the maximum usage, and compute the max encoded length based on that assumption.

Required methods

Upper bound, in bytes, of the maximum encoded size of this item.

Implementations on Foreign Types

Implementors