[−][src]Trait bm_le::Construct
Construct for a merkle tree.
Associated Types
Loading content...Required methods
fn intermediate_of(left: &Self::Value, right: &Self::Value) -> Self::Value
Get the intermediate value of given left and right child.
fn empty_at<DB>(
db: &mut DB,
depth_to_bottom: usize
) -> Result<Self::Value, <DB as Backend>::Error> where
DB: WriteBackend<Construct = Self> + ?Sized,
db: &mut DB,
depth_to_bottom: usize
) -> Result<Self::Value, <DB as Backend>::Error> where
DB: WriteBackend<Construct = Self> + ?Sized,
Get or create the empty value given a backend. empty_at(0)
should always equal to Value::End(Default::default())
.
Implementors
impl<D, V> Construct for InheritedDigestConstruct<D, V> where
D: Digest,
V: From<GenericArray<u8, <D as Digest>::OutputSize>> + AsRef<[u8]> + Default + Clone,
[src]
D: Digest,
V: From<GenericArray<u8, <D as Digest>::OutputSize>> + AsRef<[u8]> + Default + Clone,
type Value = V
fn intermediate_of(
left: &<InheritedDigestConstruct<D, V> as Construct>::Value,
right: &<InheritedDigestConstruct<D, V> as Construct>::Value
) -> <InheritedDigestConstruct<D, V> as Construct>::Value
[src]
left: &<InheritedDigestConstruct<D, V> as Construct>::Value,
right: &<InheritedDigestConstruct<D, V> as Construct>::Value
) -> <InheritedDigestConstruct<D, V> as Construct>::Value
fn empty_at<DB>(
db: &mut DB,
depth_to_bottom: usize
) -> Result<<InheritedDigestConstruct<D, V> as Construct>::Value, <DB as Backend>::Error> where
DB: WriteBackend<Construct = InheritedDigestConstruct<D, V>> + ?Sized,
[src]
db: &mut DB,
depth_to_bottom: usize
) -> Result<<InheritedDigestConstruct<D, V> as Construct>::Value, <DB as Backend>::Error> where
DB: WriteBackend<Construct = InheritedDigestConstruct<D, V>> + ?Sized,
impl<D, V> Construct for UnitDigestConstruct<D, V> where
D: Digest,
V: From<GenericArray<u8, <D as Digest>::OutputSize>> + AsRef<[u8]> + Default + Clone,
[src]
D: Digest,
V: From<GenericArray<u8, <D as Digest>::OutputSize>> + AsRef<[u8]> + Default + Clone,
type Value = V
fn intermediate_of(
left: &<UnitDigestConstruct<D, V> as Construct>::Value,
right: &<UnitDigestConstruct<D, V> as Construct>::Value
) -> <UnitDigestConstruct<D, V> as Construct>::Value
[src]
left: &<UnitDigestConstruct<D, V> as Construct>::Value,
right: &<UnitDigestConstruct<D, V> as Construct>::Value
) -> <UnitDigestConstruct<D, V> as Construct>::Value
fn empty_at<DB>(
_db: &mut DB,
_depth_to_bottom: usize
) -> Result<<UnitDigestConstruct<D, V> as Construct>::Value, <DB as Backend>::Error> where
DB: WriteBackend<Construct = UnitDigestConstruct<D, V>> + ?Sized,
[src]
_db: &mut DB,
_depth_to_bottom: usize
) -> Result<<UnitDigestConstruct<D, V> as Construct>::Value, <DB as Backend>::Error> where
DB: WriteBackend<Construct = UnitDigestConstruct<D, V>> + ?Sized,