referrerpolicy=no-referrer-when-downgrade

Trait pallet_mmr::LeafDataProvider

pub trait LeafDataProvider {
    type LeafData: FullLeaf + Decode;

    // Required method
    fn leaf_data() -> Self::LeafData;
}
Expand description

A provider of the MMR’s leaf data.

Required Associated Types§

type LeafData: FullLeaf + Decode

A type that should end up in the leaf of MMR.

Required Methods§

fn leaf_data() -> Self::LeafData

The method to return leaf data that should be placed in the leaf node appended MMR at this block.

This is being called by the on_initialize method of this pallet at the very beginning of each block.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl LeafDataProvider for ()

§

impl<A> LeafDataProvider for (A,)
where (<A as LeafDataProvider>::LeafData,): FullLeaf, A: LeafDataProvider,

LeafDataProvider implementation for (Tuple, ...)

This provides regular (non-compactable) composition of LeafDataProviders.

§

impl<A, B> LeafDataProvider for (A, B)

LeafDataProvider implementation for (Tuple, ...)

This provides regular (non-compactable) composition of LeafDataProviders.

§

impl<A, B, C> LeafDataProvider for (A, B, C)

LeafDataProvider implementation for (Tuple, ...)

This provides regular (non-compactable) composition of LeafDataProviders.

§

impl<A, B, C, D> LeafDataProvider for (A, B, C, D)

LeafDataProvider implementation for (Tuple, ...)

This provides regular (non-compactable) composition of LeafDataProviders.

§

impl<A, B, C, D, E> LeafDataProvider for (A, B, C, D, E)

LeafDataProvider implementation for (Tuple, ...)

This provides regular (non-compactable) composition of LeafDataProviders.

Implementors§

§

impl<H, A> LeafDataProvider for Compact<H, (A,)>
where H: Hash, A: LeafDataProvider,

LeafDataProvider implementation for Compact<H, (DataOrHash<H, Tuple>, ...)>

This provides a compact-form encoding for tuples wrapped in [Compact].

§

type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>,)>

§

impl<H, A, B> LeafDataProvider for Compact<H, (A, B)>
where H: Hash, A: LeafDataProvider, B: LeafDataProvider,

LeafDataProvider implementation for Compact<H, (DataOrHash<H, Tuple>, ...)>

This provides a compact-form encoding for tuples wrapped in [Compact].

§

type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>, DataOrHash<H, <B as LeafDataProvider>::LeafData>)>

§

impl<H, A, B, C> LeafDataProvider for Compact<H, (A, B, C)>

LeafDataProvider implementation for Compact<H, (DataOrHash<H, Tuple>, ...)>

This provides a compact-form encoding for tuples wrapped in [Compact].

§

type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>, DataOrHash<H, <B as LeafDataProvider>::LeafData>, DataOrHash<H, <C as LeafDataProvider>::LeafData>)>

§

impl<H, A, B, C, D> LeafDataProvider for Compact<H, (A, B, C, D)>

LeafDataProvider implementation for Compact<H, (DataOrHash<H, Tuple>, ...)>

This provides a compact-form encoding for tuples wrapped in [Compact].

§

type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>, DataOrHash<H, <B as LeafDataProvider>::LeafData>, DataOrHash<H, <C as LeafDataProvider>::LeafData>, DataOrHash<H, <D as LeafDataProvider>::LeafData>)>

§

impl<H, A, B, C, D, E> LeafDataProvider for Compact<H, (A, B, C, D, E)>

LeafDataProvider implementation for Compact<H, (DataOrHash<H, Tuple>, ...)>

This provides a compact-form encoding for tuples wrapped in [Compact].

§

type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>, DataOrHash<H, <B as LeafDataProvider>::LeafData>, DataOrHash<H, <C as LeafDataProvider>::LeafData>, DataOrHash<H, <D as LeafDataProvider>::LeafData>, DataOrHash<H, <E as LeafDataProvider>::LeafData>)>

source§

impl<T: Config> LeafDataProvider for ParentNumberAndHash<T>

§

type LeafData = (<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <T as Config>::Hash)