Skip to main content

LedgerIntegrityError

Enum LedgerIntegrityError 

Source
pub enum LedgerIntegrityError {
Show 19 variants DuplicateStableKey { stable_key: StableKey, }, DuplicateSlot { slot: Box<AllocationSlotDescriptor>, }, InvalidRecordGenerationOrder { stable_key: StableKey, first_generation: u64, last_seen_generation: u64, }, FutureRecordGeneration { stable_key: StableKey, generation: u64, current_generation: u64, }, UnexpectedRetiredGeneration { stable_key: StableKey, }, MissingRetiredGeneration { stable_key: StableKey, }, RetiredBeforeFirstGeneration { stable_key: StableKey, first_generation: u64, retired_generation: u64, }, EmptySchemaHistory { stable_key: StableKey, }, NonIncreasingSchemaHistory { stable_key: StableKey, }, SchemaHistoryOutOfBounds { stable_key: StableKey, generation: u64, }, InvalidSchemaMetadata { stable_key: StableKey, generation: u64, error: SchemaMetadataError, }, DuplicateGeneration { generation: u64, }, FutureGeneration { generation: u64, current_generation: u64, }, InvalidParentGeneration { generation: u64, parent_generation: Option<u64>, }, MissingCurrentGenerationRecord { current_generation: u64, }, NonIncreasingGenerationRecords { generation: u64, }, BrokenGenerationChain { generation: u64, expected_parent: Option<u64>, actual_parent: Option<u64>, }, UnknownRecordGeneration { stable_key: StableKey, generation: u64, }, DiagnosticMetadata(DeclarationSnapshotError),
}
Expand description

LedgerIntegrityError

Decoded ledger violates structural allocation-history invariants.

Variants§

§

DuplicateStableKey

Stable key appears in more than one allocation record.

Fields

§stable_key: StableKey

Duplicate stable key.

§

DuplicateSlot

Allocation slot appears in more than one allocation record.

Fields

§slot: Box<AllocationSlotDescriptor>

Duplicate allocation slot.

§

InvalidRecordGenerationOrder

Allocation record generation ordering is invalid.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§first_generation: u64

First generation in the record.

§last_seen_generation: u64

Last seen generation in the record.

§

FutureRecordGeneration

Allocation record points past the current generation.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§generation: u64

Generation referenced by the record.

§current_generation: u64

Current ledger generation.

§

UnexpectedRetiredGeneration

Non-retired allocation carries retired metadata.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§

MissingRetiredGeneration

Retired allocation is missing retired metadata.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§

RetiredBeforeFirstGeneration

Retired generation predates the allocation record.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§first_generation: u64

First generation in the record.

§retired_generation: u64

Retired generation in the record.

§

EmptySchemaHistory

Allocation record has no schema metadata history.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§

NonIncreasingSchemaHistory

Schema metadata generation history is not strictly increasing.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§

SchemaHistoryOutOfBounds

Schema metadata generation is outside the allocation record lifetime.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§generation: u64

Schema metadata generation.

§

InvalidSchemaMetadata

Schema metadata in committed allocation history is invalid.

Fields

§stable_key: StableKey

Stable key whose schema metadata is invalid.

§generation: u64

Generation that recorded the invalid schema metadata.

§error: SchemaMetadataError

Schema metadata validation error.

§

DuplicateGeneration

Generation record appears more than once.

Fields

§generation: u64

Duplicate generation.

§

FutureGeneration

Generation record points past the current generation.

Fields

§generation: u64

Generation record value.

§current_generation: u64

Current ledger generation.

§

InvalidParentGeneration

Generation parent does not precede the child generation.

Fields

§generation: u64

Generation record value.

§parent_generation: Option<u64>

Invalid parent generation.

§

MissingCurrentGenerationRecord

Current ledger generation has no committed generation record.

Fields

§current_generation: u64

Current ledger generation.

§

NonIncreasingGenerationRecords

Generation records are not strictly increasing in durable order.

Fields

§generation: u64

Non-increasing generation.

§

BrokenGenerationChain

Generation record parent does not match the previous committed generation.

Fields

§generation: u64

Generation whose parent link is invalid.

§expected_parent: Option<u64>

Expected parent generation.

§actual_parent: Option<u64>

Actual parent generation.

§

UnknownRecordGeneration

Allocation record refers to a generation absent from committed history.

Fields

§stable_key: StableKey

Stable key whose record is invalid.

§generation: u64

Unknown generation.

§

DiagnosticMetadata(DeclarationSnapshotError)

Generation diagnostic metadata is invalid.

Trait Implementations§

Source§

impl Clone for LedgerIntegrityError

Source§

fn clone(&self) -> LedgerIntegrityError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for LedgerIntegrityError

Source§

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

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

impl Display for LedgerIntegrityError

Source§

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

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

impl Error for LedgerIntegrityError

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

impl PartialEq for LedgerIntegrityError

Source§

fn eq(&self, other: &LedgerIntegrityError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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.
Source§

impl Eq for LedgerIntegrityError

Source§

impl StructuralPartialEq for LedgerIntegrityError

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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 = Infallible

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

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

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.