DbError

Enum DbError 

Source
pub enum DbError {
Show 63 variants Sqlite(Error), DatabaseFilesystemUnsupported { path: PathBuf, mount_point: Option<PathBuf>, filesystem_type: Option<String>, }, DatabaseFilesystemUncertain { path: PathBuf, mount_point: Option<PathBuf>, filesystem_type: Option<String>, reason: String, }, DatabaseOperatingProfile { setting: &'static str, expected: String, found: String, }, GraphContract(GraphContractError), TelemetryContract(TelemetryContractError), GraphProjectIdentityMismatch { expected: String, found: String, }, GraphPublicationUnavailable, GraphRowShape { table: &'static str, reason: &'static str, }, DerivedSnapshotInvalid { reason: &'static str, }, DerivedSnapshotLimit { resource: &'static str, found: u64, maximum: u64, }, DerivedSnapshotIo { path: PathBuf, source: Error, }, DerivedSnapshotJson(Error), SymbolGraphRowShape { path: String, reason: &'static str, }, ResolutionKeyCollision { domain: &'static str, digest: [u8; 32], }, InvalidBlobLength { field: &'static str, expected: usize, found: usize, }, GraphCountOverflow { field: &'static str, value: u64, }, SchemaVersion { found: i64, expected: i64, }, SchemaVersionMissing, SchemaShape { object: String, expected: String, found: String, }, IntegrityCheck { message: String, }, SchemaPostcondition { expected: i64, }, ProjectRootMissing, ProjectRootMismatch { expected: String, found: String, }, ProjectRootDestinationInvalid { root: String, source: Error, }, ProjectRootTransitionRequiresExistingRoot, ProjectRootTransitionRequiresDifferentRoot { root: String, }, ProjectRootStillPresent { root: String, }, ProjectRootAbsenceUncertain { root: String, source: Error, }, ProjectRootTransitionChanged { expected_root: Option<String>, found_root: Option<String>, expected_identity: Option<String>, found_identity: Option<String>, }, ProjectInstanceIdentityMissing, ProjectInstanceIdentityGenerationFailed, TransactionRollback { operation: Box<DbError>, rollback: Error, }, PublicationAcquirePolicyRestore { operation: Box<Error>, restore: Box<Error>, }, InvalidEnum { field: &'static str, value: String, }, FileTextFtsTokenUnsafe { reason: &'static str, }, FileTextFtsCandidateLimit { requested: usize, maximum: usize, }, FileTextFtsScoreInvalid { path: String, }, FileTextFtsStateInvalid { reason: &'static str, }, FileTextMetadataMismatch { path: String, field: &'static str, recorded: usize, actual: usize, }, IndexWork(IndexWorkFailure), InvalidCount { field: &'static str, value: i64, source: TryFromIntError, }, InvalidInteger { field: &'static str, value: String, source: ParseIntError, }, IntegerMetadataOverflow { field: &'static str, value: u64, }, PathNotIndexed { path: String, }, PurposeCurationTaskInvalid { reason: &'static str, }, PurposeCurationBatchTooLarge { requested: usize, maximum: usize, }, HealthFindingNotActive { finding_id: String, category: String, path: String, }, PublicationContractChanged, PublicationBaseGenerationChanged { expected: IndexGeneration, found: IndexGeneration, }, PublicationGenerationOverflow, ScanReplacementIncomplete, IndexReadSnapshotActive, TelemetryPathUnavailable, TelemetryFieldTooLarge { field: &'static str, bytes: usize, limit: usize, }, TelemetryLimitInvalid { field: &'static str, value: usize, }, TelemetryIntegerOverflow { field: &'static str, }, TelemetryInstanceInactive, TelemetryIdentityUnavailable, TelemetryInstanceMismatch, TelemetryInstanceCapacity, TelemetryBaselineCapacity, TelemetryBaselineCollision,
}
Expand description

Database-layer error type.

Variants§

§

Sqlite(Error)

SQLite operation failed.

§

DatabaseFilesystemUnsupported

A live project database is located on a known unsupported filesystem.

Fields

§path: PathBuf

Database path rejected before writable access.

§mount_point: Option<PathBuf>

Resolved mount point when one was safely available.

§filesystem_type: Option<String>

Normalized filesystem type when one was safely available.

§

DatabaseFilesystemUncertain

Local WAL-safe filesystem placement could not be proved.

Fields

§path: PathBuf

Database path rejected before writable access.

§mount_point: Option<PathBuf>

Resolved mount point when one was safely available.

§filesystem_type: Option<String>

Normalized filesystem type when one was safely available.

§reason: String

Bounded reason the local profile could not be established.

§

DatabaseOperatingProfile

SQLite did not retain a required connection operating-profile value.

Fields

§setting: &'static str

Connection or durable setting that did not match.

§expected: String

Required value.

§found: String

Observed value.

§

GraphContract(GraphContractError)

A persisted or requested graph value violates the typed domain contract.

§

TelemetryContract(TelemetryContractError)

A telemetry identity violates its typed domain contract.

§

GraphProjectIdentityMismatch

Persisted graph project identity differs from the selected identity.

Fields

§expected: String

Project identity selected by the caller.

§found: String

Project identity stored in the database.

§

GraphPublicationUnavailable

A graph query requires one complete nonzero publication generation.

§

GraphRowShape

A normalized graph row has an impossible column shape.

Fields

§table: &'static str

Owning normalized graph table.

§reason: &'static str

Stable shape diagnostic.

§

DerivedSnapshotInvalid

A derived graph snapshot violates its bounded portable contract.

Fields

§reason: &'static str

Stable validation failure.

§

DerivedSnapshotLimit

A derived graph snapshot exceeded one declared resource ceiling.

Fields

§resource: &'static str

Bounded resource that was exceeded.

§found: u64

Observed amount.

§maximum: u64

Maximum admitted amount.

§

DerivedSnapshotIo

A private snapshot capture could not be created or cleaned up.

Fields

§path: PathBuf

Private temporary path involved in the operation.

§source: Error

Underlying filesystem failure.

§

DerivedSnapshotJson(Error)

A portable snapshot payload was not valid JSON.

§

SymbolGraphRowShape

Persisted per-file symbol rows do not match their owning parser metadata.

Fields

§path: String

Repository path whose persisted graph is inconsistent.

§reason: &'static str

Stable shape diagnostic.

§

ResolutionKeyCollision

Equal scoped resolution digests retained different canonical witnesses.

Fields

§domain: &'static str

Closed resolution domain containing the conflict.

§digest: [u8; 32]

Fixed digest shared by conflicting witnesses.

§

InvalidBlobLength

A normalized binary graph field has the wrong width.

Fields

§field: &'static str

Owning database field.

§expected: usize

Required fixed byte width.

§found: usize

Observed byte width.

§

GraphCountOverflow

An unsigned graph count cannot be represented by SQLite.

Fields

§field: &'static str

Owning database field.

§value: u64

Unsigned domain value that exceeded the database range.

§

SchemaVersion

Schema version is not supported.

Fields

§found: i64

Version found in database.

§expected: i64

Expected version.

§

SchemaVersionMissing

An existing database has no durable schema version.

§

SchemaShape

A durable SQLite object does not match the supported schema contract.

Fields

§object: String

Table, index, or column whose shape is incompatible.

§expected: String

Required SQLite object kind.

§found: String

Observed SQLite object kind.

§

IntegrityCheck

SQLite integrity validation failed before migration.

Fields

§message: String

Bounded SQLite integrity diagnostic.

§

SchemaPostcondition

A migration did not reach the supported current schema.

Fields

§expected: i64

Version required after migration.

§

ProjectRootMissing

A source-owned database has no durable project identity.

§

ProjectRootMismatch

A source-owned database belongs to another project root.

Fields

§expected: String

Canonical root selected by the caller.

§found: String

Durable root recorded in SQLite.

§

ProjectRootDestinationInvalid

A root transition destination is not an absolute existing directory.

Fields

§root: String

Destination rejected before database preflight or mutation.

§source: Error

Filesystem or input failure that made the destination invalid.

§

ProjectRootTransitionRequiresExistingRoot

A move or detach requires a previously bound project root.

§

ProjectRootTransitionRequiresDifferentRoot

A move must select a destination different from the old root.

Fields

§root: String

Root that was selected as both source and destination.

§

ProjectRootStillPresent

A verified move cannot preserve identity while the old root still exists.

Fields

§root: String

Recorded old root that remains accessible.

§

ProjectRootAbsenceUncertain

Filesystem state could not prove that a move’s old root is absent.

Fields

§root: String

Recorded old root whose state is uncertain.

§source: Error

Filesystem failure that prevents an absence proof.

§

ProjectRootTransitionChanged

Root or identity state changed after transition preflight.

Fields

§expected_root: Option<String>

Root captured by read-only preflight.

§found_root: Option<String>

Root observed inside the write transaction.

§expected_identity: Option<String>

Identity captured by read-only preflight.

§found_identity: Option<String>

Identity observed inside the write transaction.

§

ProjectInstanceIdentityMissing

A bound project database has no durable instance identity.

§

ProjectInstanceIdentityGenerationFailed

SQLite did not yield a usable nonzero project identity.

§

TransactionRollback

A transaction failed and the explicit rollback also failed.

Fields

§operation: Box<DbError>

Primary operation failure that caused rollback.

§rollback: Error

Secondary rollback failure retained for diagnosis.

§

PublicationAcquirePolicyRestore

Publication acquisition failed and its standard busy policy was not restored.

Fields

§operation: Box<Error>

Writer-acquisition failure observed with fail-fast busy handling.

§restore: Box<Error>

Failure restoring the ordinary connection busy policy.

§

InvalidEnum

Invalid enum value read from the database.

Fields

§field: &'static str

Field name.

§value: String

Invalid value.

§

FileTextFtsTokenUnsafe

A literal cannot safely use the complete-candidate FTS path.

Fields

§reason: &'static str

Stable rejection reason for service fallback selection.

§

FileTextFtsCandidateLimit

One FTS request exceeded the storage-owned candidate bound.

Fields

§requested: usize

Requested exact-verification candidates.

§maximum: usize

Storage-owned hard maximum.

§

FileTextFtsScoreInvalid

SQLite returned a non-finite lexical ranking score.

Fields

§path: String

Candidate path whose score was invalid.

§

FileTextFtsStateInvalid

Durable FTS synchronization metadata is absent or contradictory.

Fields

§reason: &'static str

Stable reason that makes the acceleration state untrustworthy.

§

FileTextMetadataMismatch

Persisted text metadata disagrees with its authoritative UTF-8 content.

Fields

§path: String

Repository-relative path owning the invalid text row.

§field: &'static str

Metadata field that disagrees with content.

§recorded: usize

Persisted or caller-supplied value.

§actual: usize

Value derived from authoritative content.

§

IndexWork(IndexWorkFailure)

A bounded database read observed cancellation or its deadline.

§

InvalidCount

Count value from SQLite could not fit its owning unsigned domain type.

Fields

§field: &'static str

Count field name.

§value: i64

Invalid database count.

§source: TryFromIntError

Source conversion error.

§

InvalidInteger

Integer metadata could not be parsed without losing its source error.

Fields

§field: &'static str

Metadata field name.

§value: String

Invalid persisted value.

§source: ParseIntError

Source parse failure.

§

IntegerMetadataOverflow

Unsigned integer metadata could not advance without overflow.

Fields

§field: &'static str

Metadata key owning the monotonic value.

§value: u64

Largest persisted value that could not advance.

§

PathNotIndexed

A caller supplied a path that is not in the current index.

Fields

§path: String

Repository-relative path.

§

PurposeCurationTaskInvalid

A purpose-curation task label is blank, unsafe, or too large.

Fields

§reason: &'static str

Stable validation reason.

§

PurposeCurationBatchTooLarge

A purpose-curation hydration request exceeds the bounded statement size.

Fields

§requested: usize

Number of unique paths requested.

§maximum: usize

Maximum paths admitted to one prepared set query.

§

HealthFindingNotActive

A caller attempted to resolve a health finding that is not currently active.

Fields

§finding_id: String

Requested finding id.

§category: String

Requested category.

§path: String

Requested primary path.

§

PublicationContractChanged

A projection-only refresh no longer matches the established index contract.

§

PublicationBaseGenerationChanged

Prepared publication work was based on a generation that is no longer current.

Fields

§expected: IndexGeneration

Complete generation used to prepare the publication batch.

§found: IndexGeneration

Complete generation observed after reserving the writer transaction.

§

PublicationGenerationOverflow

A complete index generation cannot advance any further.

§

ScanReplacementIncomplete

A full scan replacement has not removed its remaining absent projections.

§

IndexReadSnapshotActive

The store already has an active read snapshot.

§

TelemetryPathUnavailable

A read-only store cannot locate its database for a separate telemetry write.

§

TelemetryFieldTooLarge

One telemetry field exceeds its declared UTF-8 byte budget.

Fields

§field: &'static str

Stable field owner.

§bytes: usize

Observed UTF-8 byte count.

§limit: usize

Maximum admitted UTF-8 byte count.

§

TelemetryLimitInvalid

A telemetry retention policy bound cannot make forward progress.

Fields

§field: &'static str

Stable retention-policy field.

§value: usize

Rejected policy value.

§

TelemetryIntegerOverflow

A telemetry counter cannot be represented exactly in SQLite.

Fields

§field: &'static str

Stable counter owner.

§

TelemetryInstanceInactive

A runtime attempted to reuse a sealed or expired instance.

§

TelemetryIdentityUnavailable

Operating-system randomness was unavailable for optional telemetry identity creation.

§

TelemetryInstanceMismatch

A runtime identity was reused with incompatible durable instance metadata.

§

TelemetryInstanceCapacity

The bounded active-instance capacity is exhausted.

§

TelemetryBaselineCapacity

The bounded active-baseline capacity is exhausted.

§

TelemetryBaselineCollision

A compact modeled-baseline key collided with different witness material.

Implementations§

Source§

impl DbError

Source

pub fn is_write_unavailable(&self) -> bool

Return whether a derived-index write could not proceed without implying corruption, schema drift, or an identity-contract failure.

Trait Implementations§

Source§

impl Debug for DbError

Source§

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

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

impl Display for DbError

Source§

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

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

impl Error for DbError

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 From<Error> for DbError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DbError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<GraphContractError> for DbError

Source§

fn from(source: GraphContractError) -> Self

Converts to this type from the input type.
Source§

impl From<IndexWorkFailure> for DbError

Source§

fn from(source: IndexWorkFailure) -> Self

Converts to this type from the input type.
Source§

impl From<TelemetryContractError> for DbError

Source§

fn from(source: TelemetryContractError) -> Self

Converts to this type from the input type.

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

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,