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
UnsupportedDatabaseVersion
Unsupported database version
InvalidPageGroupSize
Invalid page group size in the page group header
Fields
error: PageGroupSizeErrorLow-level error
InvalidStorageItem
Storage item was read successfully, but its contents are not valid
Fields
error: InvalidStorageItemErrorWhy 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
PageGroupUsedMoreThanOnce
Page group is in the logs more than once
TemporaryStorageItemBeforeChainParameters
Temporary storage item is in front of the chain parameters of the database
FailedToAdjustAncestorBlockForks
Failed to adjust ancestor block forks, because not all ancestors of the block were found
Fields
block_number: BlockNumberNumber 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: SysErrorLow-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: BlockRootRoot of the genesis block built by ClientDatabaseOptions::genesis_block_builder
stored: BlockRootGenesis root stored in the database
BlockConfirmationDepthMismatch
Database was opened with another block confirmation depth before, see
ClientDatabaseOptions::block_confirmation_depth
FailedToWriteChainParameters
Failed to write the chain parameters of the database that doesn’t have them
Trait Implementations§
Source§impl Debug for ClientDatabaseError
impl Debug for ClientDatabaseError
Source§impl Display for ClientDatabaseError
impl Display for ClientDatabaseError
Source§impl Error for ClientDatabaseError
impl Error for ClientDatabaseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ClientDatabaseError
impl !UnwindSafe for ClientDatabaseError
impl Forget for ClientDatabaseError
impl Freeze for ClientDatabaseError
impl Move for ClientDatabaseError
impl Send for ClientDatabaseError
impl Sync for ClientDatabaseError
impl Unpin for ClientDatabaseError
impl UnsafeUnpin for ClientDatabaseErrorwhere
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
&'static str: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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