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
.
Object Safety§
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>)>
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>)>
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>)>
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>)>
FullLeaf implementation for Compact<H, (DataOrHash<H, Tuple>, ...)>