referrerpolicy=no-referrer-when-downgrade
pallet_mmr

Trait FullLeaf

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

A full leaf content stored in the offchain-db.

Required Methods§

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

Encode the leaf either in its full or compact form.

NOTE the encoding returned here MUST be Decodeable into FullLeaf.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl FullLeaf for OpaqueLeaf

§

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

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

§

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

§

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

§

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

§

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

§

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