Enum trie_db::TrieError[][src]

pub enum TrieError<T, E> {
    InvalidStateRoot(T),
    IncompleteDatabase(T),
    ValueAtIncompleteKey(Vec<u8>, u8),
    DecoderError(T, E),
    InvalidHash(T, Vec<u8>),
}
Expand description

Trie Errors.

These borrow the data within them to avoid excessive copying on every trie operation.

Variants

InvalidStateRoot(T)

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

IncompleteDatabase(T)

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(T, E)

Corrupt Trie item

InvalidHash(T, Vec<u8>)

Trait Implementations

impl<T: Clone, E: Clone> Clone for TrieError<T, E>[src]

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

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug, E: Debug> Debug for TrieError<T, E>[src]

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

Formats the value using the given formatter. Read more

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

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

Formats the value using the given formatter. Read more

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

fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]

The lower-level source of this error, if any. Read more

fn backtrace(&self) -> Option<&Backtrace>[src]

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

fn description(&self) -> &str1.0.0[src]

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

fn cause(&self) -> Option<&dyn Error>1.0.0[src]

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

impl<T: PartialEq, E: PartialEq> PartialEq<TrieError<T, E>> for TrieError<T, E>[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &TrieError<T, E>) -> bool[src]

This method tests for !=.

impl<T: Eq, E: Eq> Eq for TrieError<T, E>[src]

impl<T, E> StructuralEq for TrieError<T, E>[src]

impl<T, E> StructuralPartialEq for TrieError<T, E>[src]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> MaybeDebug for T where
    T: Debug
[src]