referrerpolicy=no-referrer-when-downgrade
sp_trie

Type Alias TrieError

Source
pub type TrieError<L> = TrieError<TrieHash<L>, CError<L>>;
Expand description

TrieDB error over TrieConfiguration trait.

Aliased Type§

enum TrieError<L> {
    InvalidStateRoot(<<L as TrieLayout>::Hash as Hasher>::Out),
    IncompleteDatabase(<<L as TrieLayout>::Hash as Hasher>::Out),
    ValueAtIncompleteKey(Vec<u8>, u8),
    DecoderError(<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error),
    InvalidHash(<<L as TrieLayout>::Hash as Hasher>::Out, Vec<u8>),
}

Variants§

§

InvalidStateRoot(<<L as TrieLayout>::Hash as Hasher>::Out)

Attempted to create a trie with a state root not in the DB.

§

IncompleteDatabase(<<L as TrieLayout>::Hash as Hasher>::Out)

Trie item not found in the database,

§

ValueAtIncompleteKey(Vec<u8>, u8)

A value was found in the trie with a nibble key that was not byte-aligned. The first parameter is the byte-aligned part of the prefix and the second parameter is the remaining nibble.

§

DecoderError(<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error)

Corrupt Trie item.

§

InvalidHash(<<L as TrieLayout>::Hash as Hasher>::Out, Vec<u8>)

Hash is not value.

Trait Implementations

§

impl<T, E> Clone for TrieError<T, E>
where T: Clone, E: Clone,

§

fn clone(&self) -> TrieError<T, E>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T, E> Debug for TrieError<T, E>
where T: Debug, E: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T, E> Display for TrieError<T, E>
where T: MaybeDebug, E: MaybeDebug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T, E> Error for TrieError<T, E>
where T: Debug, E: Error,

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
§

impl<T, E> PartialEq for TrieError<T, E>
where T: PartialEq, E: PartialEq,

§

fn eq(&self, other: &TrieError<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<T, E> Eq for TrieError<T, E>
where T: Eq, E: Eq,

§

impl<T, E> StructuralPartialEq for TrieError<T, E>