Skip to main content

ClientDatabaseError

Enum ClientDatabaseError 

Source
pub enum ClientDatabaseError {
Show 17 variants InvalidBlockConfirmationDepth, InvalidSoftConfirmationDepth, ReadRequestCancelled, ReadError { error: Error, }, UnsupportedDatabaseVersion { database_version: u8, }, InvalidPageGroupSize { error: PageGroupSizeError, }, InvalidStorageItem { storage_item: &'static str, page_offset: u32, error: InvalidStorageItemError, }, InvalidLogEntry { sequence_number: u64, page_offset: u32, }, PageGroupUsedMoreThanOnce { page_group_index: u32, }, TemporaryStorageItemBeforeChainParameters { page_offset: u32, }, FailedToAdjustAncestorBlockForks { block_number: BlockNumber, }, Unformatted, NonPermanentFirstPageGroup, FailedToGenerateSessionValue { error: SysError, }, GenesisRootMismatch { expected: BlockRoot, stored: BlockRoot, }, BlockConfirmationDepthMismatch { expected: BlockNumber, stored: BlockNumber, }, FailedToWriteChainParameters { error: Error, },
}

Variants§

§

InvalidBlockConfirmationDepth

Invalid block confirmation depth, it must be at least 2.

Fork blocks are only accepted above block offset block_confirmation_depth - 1, smaller values leave no block offset for them.

§

InvalidSoftConfirmationDepth

Invalid soft confirmation depth, it must be smaller than block confirmation depth

§

ReadRequestCancelled

Storage backend has canceled read request

§

ReadError

Storage backend read error

Fields

§error: Error

Low-level error

§

UnsupportedDatabaseVersion

Unsupported database version

Fields

§database_version: u8

Database version

§

InvalidPageGroupSize

Invalid page group size in the page group header

Fields

§error: PageGroupSizeError

Low-level error

§

InvalidStorageItem

Storage item was read successfully, but its contents are not valid

Fields

§storage_item: &'static str

Name of the storage item

§page_offset: u32

Page offset where storage item is found

§error: InvalidStorageItemError

Why the storage item is not valid

§

InvalidLogEntry

Storage item continues the log, but can’t be decoded or is not valid where it is, like after a change of the format without a change of the database version

Fields

§sequence_number: u64

Sequence number of the storage item

§page_offset: u32

Page offset where the storage item is found

§

PageGroupUsedMoreThanOnce

Page group is in the logs more than once

Fields

§page_group_index: u32

Index of the page group

§

TemporaryStorageItemBeforeChainParameters

Temporary storage item is in front of the chain parameters of the database

Fields

§page_offset: u32

Page offset where the storage item is found

§

FailedToAdjustAncestorBlockForks

Failed to adjust ancestor block forks, because not all ancestors of the block were found

Fields

§block_number: BlockNumber

Number of the block whose ancestors were not found

§

Unformatted

Database is not formatted yet

§

NonPermanentFirstPageGroup

Non-permanent first page group

§

FailedToGenerateSessionValue

Failed to generate the random value that storage items written after opening carry

Fields

§error: SysError

Low-level error

§

GenesisRootMismatch

Database stores another chain, whose genesis root is not the root of the genesis block built by ClientDatabaseOptions::genesis_block_builder

Fields

§expected: BlockRoot

Root of the genesis block built by ClientDatabaseOptions::genesis_block_builder

§stored: BlockRoot

Genesis root stored in the database

§

BlockConfirmationDepthMismatch

Database was opened with another block confirmation depth before, see ClientDatabaseOptions::block_confirmation_depth

Fields

§stored: BlockNumber

Block confirmation depth stored in the database

§

FailedToWriteChainParameters

Failed to write the chain parameters of the database that doesn’t have them

Fields

§error: Error

Low-level error

Trait Implementations§

Source§

impl Debug for ClientDatabaseError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for ClientDatabaseError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Error for ClientDatabaseError

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

Replaced by Error::source.
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

Auto Trait Implementations§

§

impl !RefUnwindSafe for ClientDatabaseError

§

impl !UnwindSafe for ClientDatabaseError

§

impl Forget for ClientDatabaseError

§

impl Freeze for ClientDatabaseError
where *const () is !null: Freeze, PhantomData<ErrorData<CustomOwner>>: Freeze, &'static str: Freeze, NonZero<i32>: Freeze,

§

impl Move for ClientDatabaseError

§

impl Send for ClientDatabaseError
where Repr: Send, &'static str: Send, NonZero<i32>: Send,

§

impl Sync for ClientDatabaseError
where Repr: Sync, NonZero<i32>: Sync,

§

impl Unpin for ClientDatabaseError
where *const () is !null: Unpin, &'static SimpleMessage: Unpin, *const Custom is !null: Unpin, &'static str: Unpin, NonZero<i32>: Unpin,

§

impl UnsafeUnpin for ClientDatabaseError
where *const () is !null: UnsafeUnpin, PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin, &'static str: UnsafeUnpin, NonZeroI32Inner: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more