Trait LeafDataProvider
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§
Required Methods§
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.
Implementations on Foreign Types§
§impl LeafDataProvider for ()
impl LeafDataProvider for ()
§impl<A> LeafDataProvider for (A,)
impl<A> LeafDataProvider for (A,)
LeafDataProvider implementation for (Tuple, ...)
This provides regular (non-compactable) composition of LeafDataProviders.
type LeafData = (<A as LeafDataProvider>::LeafData,)
fn leaf_data() -> <(A,) as LeafDataProvider>::LeafData
§impl<A, B> LeafDataProvider for (A, B)where
(<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData): FullLeaf,
A: LeafDataProvider,
B: LeafDataProvider,
impl<A, B> LeafDataProvider for (A, B)where
(<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData): FullLeaf,
A: LeafDataProvider,
B: LeafDataProvider,
LeafDataProvider implementation for (Tuple, ...)
This provides regular (non-compactable) composition of LeafDataProviders.
type LeafData = (<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData)
fn leaf_data() -> <(A, B) as LeafDataProvider>::LeafData
§impl<A, B, C> LeafDataProvider for (A, B, C)where
(<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData): FullLeaf,
A: LeafDataProvider,
B: LeafDataProvider,
C: LeafDataProvider,
impl<A, B, C> LeafDataProvider for (A, B, C)where
(<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData): FullLeaf,
A: LeafDataProvider,
B: LeafDataProvider,
C: LeafDataProvider,
LeafDataProvider implementation for (Tuple, ...)
This provides regular (non-compactable) composition of LeafDataProviders.
type LeafData = (<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData)
fn leaf_data() -> <(A, B, C) as LeafDataProvider>::LeafData
§impl<A, B, C, D> LeafDataProvider for (A, B, C, D)where
(<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData, <D as LeafDataProvider>::LeafData): FullLeaf,
A: LeafDataProvider,
B: LeafDataProvider,
C: LeafDataProvider,
D: LeafDataProvider,
impl<A, B, C, D> LeafDataProvider for (A, B, C, D)where
(<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData, <D as LeafDataProvider>::LeafData): FullLeaf,
A: LeafDataProvider,
B: LeafDataProvider,
C: LeafDataProvider,
D: LeafDataProvider,
LeafDataProvider implementation for (Tuple, ...)
This provides regular (non-compactable) composition of LeafDataProviders.
type LeafData = (<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData, <D as LeafDataProvider>::LeafData)
fn leaf_data() -> <(A, B, C, D) as LeafDataProvider>::LeafData
§impl<A, B, C, D, E> LeafDataProvider for (A, B, C, D, E)where
(<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData, <D as LeafDataProvider>::LeafData, <E as LeafDataProvider>::LeafData): FullLeaf,
A: LeafDataProvider,
B: LeafDataProvider,
C: LeafDataProvider,
D: LeafDataProvider,
E: LeafDataProvider,
impl<A, B, C, D, E> LeafDataProvider for (A, B, C, D, E)where
(<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData, <D as LeafDataProvider>::LeafData, <E as LeafDataProvider>::LeafData): FullLeaf,
A: LeafDataProvider,
B: LeafDataProvider,
C: LeafDataProvider,
D: LeafDataProvider,
E: LeafDataProvider,
LeafDataProvider implementation for (Tuple, ...)
This provides regular (non-compactable) composition of LeafDataProviders.
type LeafData = (<A as LeafDataProvider>::LeafData, <B as LeafDataProvider>::LeafData, <C as LeafDataProvider>::LeafData, <D as LeafDataProvider>::LeafData, <E as LeafDataProvider>::LeafData)
fn leaf_data() -> <(A, B, C, D, E) as LeafDataProvider>::LeafData
Implementors§
§impl<H, A> LeafDataProvider for Compact<H, (A,)>where
H: Hash,
A: LeafDataProvider,
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].
type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>,)>
§impl<H, A, B> LeafDataProvider for Compact<H, (A, B)>where
H: Hash,
A: LeafDataProvider,
B: LeafDataProvider,
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].
type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>, DataOrHash<H, <B as LeafDataProvider>::LeafData>)>
§impl<H, A, B, C> LeafDataProvider for Compact<H, (A, B, C)>
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].
type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>, DataOrHash<H, <B as LeafDataProvider>::LeafData>, DataOrHash<H, <C as LeafDataProvider>::LeafData>)>
§impl<H, A, B, C, D> LeafDataProvider for Compact<H, (A, B, C, D)>
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].
type LeafData = Compact<H, (DataOrHash<H, <A as LeafDataProvider>::LeafData>, DataOrHash<H, <B as LeafDataProvider>::LeafData>, DataOrHash<H, <C as LeafDataProvider>::LeafData>, DataOrHash<H, <D as LeafDataProvider>::LeafData>)>
§impl<H, A, B, C, D, E> LeafDataProvider for Compact<H, (A, B, C, D, E)>where
H: Hash,
A: LeafDataProvider,
B: LeafDataProvider,
C: LeafDataProvider,
D: LeafDataProvider,
E: LeafDataProvider,
impl<H, A, B, C, D, E> LeafDataProvider for Compact<H, (A, B, C, D, E)>where
H: Hash,
A: LeafDataProvider,
B: LeafDataProvider,
C: LeafDataProvider,
D: LeafDataProvider,
E: LeafDataProvider,
LeafDataProvider implementation for Compact<H, (DataOrHash<H, Tuple>, ...)>
This provides a compact-form encoding for tuples wrapped in [Compact].