sp_mmr_primitives

Trait FullLeaf

source
pub trait FullLeaf:
    Clone
    + PartialEq
    + Debug {
    // Required method
    fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F, compact: bool) -> R;
}
Expand description

A full leaf content stored in the offchain-db.

Required Methods§

source

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F, compact: bool) -> R

Encode the leaf either in its full or compact form.

NOTE the encoding returned here MUST be Decodeable into FullLeaf.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl FullLeaf for OpaqueLeaf

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

impl<T: Encode + Decode + Clone + PartialEq + Debug> FullLeaf for T