referrerpolicy=no-referrer-when-downgrade

Trait sp_mmr_primitives::LeafDataProvider

source ·
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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl LeafDataProvider for ()

source§

impl<A> LeafDataProvider for (A,)

LeafDataProvider implementation for (Tuple, ...)

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

source§

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

LeafDataProvider implementation for (Tuple, ...)

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

source§

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

LeafDataProvider implementation for (Tuple, ...)

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

source§

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

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)

LeafDataProvider implementation for (Tuple, ...)

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

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)>

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)>

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)>

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

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