pub enum NodeHashAlgorithm {
MerkleDB,
Ethereum,
}Expand description
The hash algorithm used by the node store.
This must currently match the compile-time option. However, it will eventually be made a runtime option when initializing the node store. Therefore, the option is required when initializing and opening the node store to ensure compatibility and to detect any mismatches.
Variants§
MerkleDB
Use the MerkleDB node hashing algorithm, with sha256 as the hash function.
Ethereum
Use the Ethereum state trie node hashing algorithm, with keccak256 as the hash function.
Implementations§
Source§impl NodeHashAlgorithm
impl NodeHashAlgorithm
Sourcepub const fn matches_compile_option(self) -> bool
pub const fn matches_compile_option(self) -> bool
Returns whether this hash algorithm matches the compile-time option.
Trait Implementations§
Source§impl Clone for NodeHashAlgorithm
impl Clone for NodeHashAlgorithm
Source§fn clone(&self) -> NodeHashAlgorithm
fn clone(&self) -> NodeHashAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeHashAlgorithm
impl Debug for NodeHashAlgorithm
Source§impl Hash for NodeHashAlgorithm
impl Hash for NodeHashAlgorithm
Source§impl PartialEq for NodeHashAlgorithm
impl PartialEq for NodeHashAlgorithm
Source§impl TryFrom<u64> for NodeHashAlgorithm
impl TryFrom<u64> for NodeHashAlgorithm
impl Copy for NodeHashAlgorithm
impl Eq for NodeHashAlgorithm
impl StructuralPartialEq for NodeHashAlgorithm
Auto Trait Implementations§
impl Freeze for NodeHashAlgorithm
impl RefUnwindSafe for NodeHashAlgorithm
impl Send for NodeHashAlgorithm
impl Sync for NodeHashAlgorithm
impl Unpin for NodeHashAlgorithm
impl UnsafeUnpin for NodeHashAlgorithm
impl UnwindSafe for NodeHashAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ValueSize for T
impl<T> ValueSize for T
Source§fn value_size(&self) -> usize
fn value_size(&self) -> usize
The size of this value in bytes, excluding allocated data. Read more
Source§fn value_size_sum_iter<'item>(iterator: impl Iterator<Item = &'item T>) -> usizewhere
T: 'item,
fn value_size_sum_iter<'item>(iterator: impl Iterator<Item = &'item T>) -> usizewhere
T: 'item,
The total sum of the sizes of all values in the given iterator, in
bytes. This is default-implemented by computing ValueSize::value_size
on every element and summing them. For Sized types, a more potentially
efficient implementation using Iterator::count is provided. If you are
implementing this trait manually, it is unlikely to be more efficient to
provide a manual implementation here. Read more
Source§fn value_size_sum_exact_size_iter<'item>(
iterator: impl ExactSizeIterator<Item = &'item T>,
) -> usizewhere
T: 'item,
fn value_size_sum_exact_size_iter<'item>(
iterator: impl ExactSizeIterator<Item = &'item T>,
) -> usizewhere
T: 'item,
The total sum of the sizes of all values in the given
exact-size-iterator, in bytes. This is default-implemented by using
ValueSize::value_size_sum_iter. For Sized types, a usually more
efficient implementation using ExactSizeIterator::len is provided. If
you are implementing this trait manually, it is unlikely to be more
efficient to provide a manual implementation here. Read more