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

impl MaxEncodedLen for ProxyType

impl<Balance: MaxEncodedLen, AccountId: MaxEncodedLen, DepositBalance: MaxEncodedLen> MaxEncodedLen for AssetDetails<Balance, AccountId, DepositBalance>

impl<Balance: MaxEncodedLen, DepositBalance: MaxEncodedLen> MaxEncodedLen for Approval<Balance, DepositBalance>

impl<Balance: MaxEncodedLen, Extra: MaxEncodedLen> MaxEncodedLen for AssetBalance<Balance, Extra>

impl<DepositBalance: MaxEncodedLen, BoundedString: MaxEncodedLen> MaxEncodedLen for AssetMetadata<DepositBalance, BoundedString>

impl MaxEncodedLen for DestroyWitness

impl MaxEncodedLen for Reasons

impl<Balance: MaxEncodedLen> MaxEncodedLen for BalanceLock<Balance>

impl<ReserveIdentifier: MaxEncodedLen, Balance: MaxEncodedLen> MaxEncodedLen for ReserveData<ReserveIdentifier, Balance>

impl<Balance: MaxEncodedLen> MaxEncodedLen for AccountData<Balance>

impl MaxEncodedLen for Public

impl MaxEncodedLen for Data

impl<Balance: Encode + Decode + MaxEncodedLen + Copy + Clone + Debug + Eq + PartialEq> MaxEncodedLen for Judgement<Balance>

impl MaxEncodedLen for IdentityFields

impl<FieldLimit: Get<u32>> MaxEncodedLen for IdentityInfo<FieldLimit> where
    FieldLimit: Get<u32>, 

impl<Balance: Encode + Decode + MaxEncodedLen + Copy + Clone + Debug + Eq + PartialEq, MaxJudgements: Get<u32>, MaxAdditionalFields: Get<u32>> MaxEncodedLen for Registration<Balance, MaxJudgements, MaxAdditionalFields> where
    Balance: Encode + Decode + MaxEncodedLen + Copy + Clone + Debug + Eq + PartialEq + Zero + Add,
    MaxJudgements: Get<u32>,
    MaxAdditionalFields: Get<u32>, 

impl<Balance: Encode + Decode + Clone + Debug + Eq + PartialEq + MaxEncodedLen, AccountId: Encode + Decode + Clone + Debug + Eq + PartialEq + MaxEncodedLen> MaxEncodedLen for RegistrarInfo<Balance, AccountId>

impl<AccountId: MaxEncodedLen, ProxyType: MaxEncodedLen, BlockNumber: MaxEncodedLen> MaxEncodedLen for ProxyDefinition<AccountId, ProxyType, BlockNumber>

impl<AccountId: MaxEncodedLen, Hash: MaxEncodedLen, BlockNumber: MaxEncodedLen> MaxEncodedLen for Announcement<AccountId, Hash, BlockNumber>

impl<AccountId: MaxEncodedLen, Balance: MaxEncodedLen> MaxEncodedLen for Proposal<AccountId, Balance>

impl MaxEncodedLen for Public

impl MaxEncodedLen for Public

impl MaxEncodedLen for Public

impl MaxEncodedLen for AccountId32

impl MaxEncodedLen for Public

impl MaxEncodedLen for Public

impl MaxEncodedLen for Public