#[repr(C)]pub enum NodeHashAlgorithm {
MerkleDB = 0,
Ethereum = 1,
}Expand description
The hashing mode to use for the database.
This determines the cryptographic hash function and trie structure used.
Variants§
MerkleDB = 0
MerkleDB Firewood hashing (SHA-256 based)
Ethereum = 1
Ethereum-compatible hashing (Keccak-256 based)
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NodeHashAlgorithm
Source§impl Debug for NodeHashAlgorithm
impl Debug for NodeHashAlgorithm
impl Eq for NodeHashAlgorithm
Source§impl From<NodeHashAlgorithm> for NodeHashAlgorithm
impl From<NodeHashAlgorithm> for NodeHashAlgorithm
Source§fn from(alg: NodeHashAlgorithm) -> Self
fn from(alg: NodeHashAlgorithm) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NodeHashAlgorithm
impl PartialEq for NodeHashAlgorithm
Source§fn eq(&self, other: &NodeHashAlgorithm) -> bool
fn eq(&self, other: &NodeHashAlgorithm) -> bool
Tests for
self and other values to be equal, and is used by ==.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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