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§

source

type LeafData: FullLeaf + Decode

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

Required Methods§

source

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.

Implementations on Foreign Types§

source§

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

LeafDataProvider implementation for (Tuple, ...)

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

source§

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

LeafDataProvider implementation for (Tuple, ...)

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

source§

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

LeafDataProvider implementation for (Tuple, ...)

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

source§

impl<A, B, C, D, E> LeafDataProvider for (A, B, C, D, E)where (<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData, <D as LeafDataProvider>::LeafData, <E as LeafDataProvider>::LeafData): FullLeaf, A: LeafDataProvider, B: LeafDataProvider, C: LeafDataProvider, D: LeafDataProvider, E: LeafDataProvider,

LeafDataProvider implementation for (Tuple, ...)

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

source§

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.

source§

impl LeafDataProvider for ()

Implementors§

source§

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.

source§

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.

source§

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

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

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

source§

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

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

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

source§

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

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

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

source§

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

§

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