pub enum DbError {
Show 88 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),
InvalidWorktreeAlias {
alias: String,
reason: &'static str,
},
WorktreeRegistrationNotFound {
alias: String,
},
WorktreeRegistrationConflict {
field: &'static str,
value: String,
},
WorktreeRegistrationMigrationConflict {
field: &'static str,
first_registration_id: i64,
second_registration_id: i64,
},
WorktreeRegistrationMigrationIdentityUnavailable {
field: &'static str,
registration_id: i64,
},
WorktreeRegistrationCapacity {
limit: usize,
},
InvalidWorktreeRegistrationPath {
field: &'static str,
path: String,
},
WorktreeRegistrationRow {
reason: &'static str,
},
WorktreeTelemetryProjectMismatch {
registration_id: i64,
},
WorktreeTelemetrySnapshotLimit {
resource: &'static str,
limit: usize,
observed: usize,
},
WorktreeTelemetryOriginConflict,
WorktreeHydrationInvalid {
reason: &'static str,
},
WorktreeHydrationDestinationExists {
path: PathBuf,
},
WorktreeHydrationIo {
path: PathBuf,
source: Error,
},
WorktreeHydrationBackupBusy {
attempts: usize,
},
WorktreeHydrationNotReconciled {
baseline: IndexGeneration,
found: IndexGeneration,
},
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,
identities: Option<Box<ProjectRootMismatchIdentities>>,
},
ProjectRootIdentity(CoreError),
ProjectRootIdentityMissing,
LegacyRootAdoptionUnavailable,
LegacyRootAdoptionCommittedLocationChanged {
source: Box<DbError>,
},
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,
},
FileContentClassificationBatchTooLarge {
requested: usize,
maximum: usize,
},
FileContentClassificationDuplicatePath {
path: String,
},
FileContentClassificationMissing {
path: String,
},
FileContentClassificationNotCurrent {
path: String,
},
FileContentClassificationLimit {
requested: u32,
maximum: u32,
},
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
DatabaseFilesystemUncertain
Local WAL-safe filesystem placement could not be proved.
Fields
DatabaseOperatingProfile
SQLite did not retain a required connection operating-profile value.
Fields
GraphContract(GraphContractError)
A persisted or requested graph value violates the typed domain contract.
TelemetryContract(TelemetryContractError)
A telemetry identity violates its typed domain contract.
InvalidWorktreeAlias
A requested worktree alias violates the public registry contract.
WorktreeRegistrationNotFound
No active worktree registration has the requested alias.
WorktreeRegistrationConflict
A registration identity is already owned by another active worktree.
WorktreeRegistrationMigrationConflict
A legacy active registration would violate native identity uniqueness.
Fields
A legacy path projection cannot establish its original native identity.
WorktreeRegistrationCapacity
The bounded worktree-registration catalog is full.
InvalidWorktreeRegistrationPath
A registration path is not an absolute caller-validated structural identity.
Fields
WorktreeRegistrationRow
A persisted worktree registration row violates its typed contract.
WorktreeTelemetryProjectMismatch
A worktree aggregate snapshot belongs to a different initialized atlas.
WorktreeTelemetrySnapshotLimit
A bounded worktree telemetry snapshot resource ceiling was exceeded.
Fields
WorktreeTelemetryOriginConflict
One telemetry runtime instance was reused across incompatible origins.
WorktreeHydrationInvalid
A worktree hydration request violates its target-local safety contract.
WorktreeHydrationDestinationExists
A hydration destination already contains a database and cannot be replaced.
WorktreeHydrationIo
Worktree hydration could not create, clean, or activate its private candidate.
Fields
WorktreeHydrationBackupBusy
Online backup could not make progress within its fixed busy retry budget.
WorktreeHydrationNotReconciled
The candidate has not completed a post-hydration source reconciliation.
Fields
baseline: IndexGenerationGeneration published by baseline rebinding.
found: IndexGenerationCurrent complete generation, or zero when unavailable.
GraphProjectIdentityMismatch
Persisted graph project identity differs from the selected identity.
Fields
A graph query requires one complete nonzero publication generation.
GraphRowShape
A normalized graph row has an impossible column shape.
Fields
DerivedSnapshotInvalid
A derived graph snapshot violates its bounded portable contract.
DerivedSnapshotLimit
A derived graph snapshot exceeded one declared resource ceiling.
Fields
DerivedSnapshotIo
A private snapshot capture could not be created or cleaned up.
Fields
DerivedSnapshotJson(Error)
A portable snapshot payload was not valid JSON.
SymbolGraphRowShape
Persisted per-file symbol rows do not match their owning parser metadata.
Fields
ResolutionKeyCollision
Equal scoped resolution digests retained different canonical witnesses.
Fields
InvalidBlobLength
A normalized binary graph field has the wrong width.
Fields
GraphCountOverflow
An unsigned graph count cannot be represented by SQLite.
Fields
SchemaVersion
Schema version is not supported.
SchemaVersionMissing
An existing database has no durable schema version.
SchemaShape
A durable SQLite object does not match the supported schema contract.
Fields
IntegrityCheck
SQLite integrity validation failed before migration.
SchemaPostcondition
A migration did not reach the supported current schema.
ProjectRootMissing
A source-owned database has no durable project identity.
ProjectRootMismatch
A source-owned database belongs to another project root.
Fields
identities: Option<Box<ProjectRootMismatchIdentities>>Lossless native identities when the admission proof had both roots.
ProjectRootIdentity(CoreError)
A native project-root identity or its lossless codec is invalid.
ProjectRootIdentityMissing
A current bound database has no lossless native project-root identity.
Explicit legacy adoption requires the intact released schema-19 state.
LegacyRootAdoptionCommittedLocationChanged
Adoption committed, but its database location could not be verified afterward.
Fields
ProjectRootDestinationInvalid
A root transition destination is not an absolute existing directory.
Fields
ProjectRootTransitionRequiresExistingRoot
A move or detach requires a previously bound project root.
ProjectRootTransitionRequiresDifferentRoot
A move must select a destination different from the old root.
ProjectRootStillPresent
A verified move cannot preserve identity while the old root still exists.
ProjectRootAbsenceUncertain
Filesystem state could not prove that a move’s old root is absent.
Fields
ProjectRootTransitionChanged
Root or identity state changed after transition preflight.
Fields
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
rollback: ErrorSecondary rollback failure retained for diagnosis.
PublicationAcquirePolicyRestore
Publication acquisition failed and its standard busy policy was not restored.
Fields
InvalidEnum
Invalid enum value read from the database.
FileTextFtsTokenUnsafe
A literal cannot safely use the complete-candidate FTS path.
FileTextFtsCandidateLimit
One FTS request exceeded the storage-owned candidate bound.
Fields
FileTextFtsScoreInvalid
SQLite returned a non-finite lexical ranking score.
FileTextFtsStateInvalid
Durable FTS synchronization metadata is absent or contradictory.
FileTextMetadataMismatch
Persisted text metadata disagrees with its authoritative UTF-8 content.
Fields
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
source: TryFromIntErrorSource conversion error.
InvalidInteger
Integer metadata could not be parsed without losing its source error.
Fields
source: ParseIntErrorSource parse failure.
IntegerMetadataOverflow
Unsigned integer metadata could not advance without overflow.
Fields
PathNotIndexed
A caller supplied a path that is not in the current index.
FileContentClassificationBatchTooLarge
One classification write/read batch exceeded its fixed path ceiling.
FileContentClassificationDuplicatePath
One classification batch repeated an exact path.
FileContentClassificationMissing
A current admitted file has no classification in the active transaction.
FileContentClassificationNotCurrent
A classification row outlived current file ownership.
FileContentClassificationLimit
One classification/path page requested an invalid row limit.
PurposeCurationTaskInvalid
A purpose-curation task label is blank, unsafe, or too large.
PurposeCurationBatchTooLarge
A purpose-curation hydration request exceeds the bounded statement size.
Fields
HealthFindingNotActive
A caller attempted to resolve a health finding that is not currently active.
Fields
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: IndexGenerationComplete generation used to prepare the publication batch.
found: IndexGenerationComplete 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.
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
TelemetryLimitInvalid
A telemetry retention policy bound cannot make forward progress.
TelemetryIntegerOverflow
A telemetry counter cannot be represented exactly in SQLite.
TelemetryInstanceInactive
A runtime attempted to reuse a sealed or expired instance.
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
impl DbError
Sourcepub fn supported_schema_migration(&self) -> Option<(i64, i64, u32)>
pub fn supported_schema_migration(&self) -> Option<(i64, i64, u32)>
Return a schema version with a complete migration route owned by this runtime.
Sourcepub fn unsupported_schema_version(&self) -> Option<(i64, i64)>
pub fn unsupported_schema_version(&self) -> Option<(i64, i64)>
Return a schema version rejected by this runtime’s migration inventory.
Return whether a derived-index write could not proceed without implying corruption, schema drift, or an identity-contract failure.
Trait Implementations§
Source§impl Error for DbError
impl Error for DbError
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()