Trait sp_mmr_primitives::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§
sourcefn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F, compact: bool) -> R
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 Decode
able into FullLeaf
.
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>, ...)>