pub enum StoreError {
Show 30 variants
Database {
path: PathBuf,
action: &'static str,
source: Error,
},
Json(Error),
Validation(ValidationError),
Engine(EngineError),
AlreadyInitialized(PathBuf),
NotInitialized(PathBuf),
RevisionConflict {
expected: u64,
actual: u64,
},
InvalidOperationRevision {
base: u64,
result: u64,
plan: u64,
},
SnapshotMismatch(OperationId),
CorruptSnapshot {
path: PathBuf,
record: StoredRecord,
row: u64,
json: u64,
},
UnsupportedSchemaVersion {
path: PathBuf,
found: i64,
supported: i64,
},
RetiredSchemaVersion {
path: PathBuf,
found: i64,
current: i64,
},
UnrecognizedSchema {
path: PathBuf,
detail: String,
},
TargetExists {
path: PathBuf,
},
Io {
action: &'static str,
path: PathBuf,
source: Error,
},
BackupIncomplete {
path: PathBuf,
state: String,
},
IntegrityCheckFailed {
path: PathBuf,
problems: Vec<String>,
},
HistoryDiscontinuity {
path: PathBuf,
sequence: u64,
expected: u64,
found: u64,
},
SnapshotRevisionMismatch {
path: PathBuf,
snapshot: u64,
last_operation: u64,
},
CorruptJson {
path: PathBuf,
record: StoredRecord,
field: &'static str,
source: Error,
},
CorruptColumn {
path: PathBuf,
record: StoredRecord,
field: &'static str,
source: Error,
},
SequenceGap {
path: PathBuf,
previous: u64,
sequence: u64,
},
MissingHistory {
path: PathBuf,
origin: u64,
snapshot: u64,
},
MissingGenesis {
path: PathBuf,
},
ReplayRefused {
path: PathBuf,
sequence: u64,
source: EngineError,
},
ReplayDiverged {
path: PathBuf,
revision: u64,
differing: Vec<String>,
},
Lineage(LineageError),
ForeignOperation {
path: PathBuf,
sequence: u64,
found: WorkspaceId,
expected: WorkspaceId,
},
DuplicateOperation {
recorded: Box<HistoryEntry>,
},
InvalidTarget {
path: PathBuf,
reason: &'static str,
},
}Expand description
A persistence operation that could not be completed safely.
Variants§
Database
SQLite failed while accessing the named database.
Fields
Json(Error)
Snapshot or operation serialization failed.
Validation(ValidationError)
The supplied graph violates model invariants.
Engine(EngineError)
The supplied operation cannot produce a valid state transition.
AlreadyInitialized(PathBuf)
A caller attempted to replace existing history during initialization.
NotInitialized(PathBuf)
Persistence requires an existing initial snapshot.
RevisionConflict
The caller’s base revision is stale.
InvalidOperationRevision
Snapshot revisions do not describe one consecutive wrapping operation.
Fields
SnapshotMismatch(OperationId)
Snapshot contents differ from the actual result of the supplied command.
CorruptSnapshot
Stored revision metadata disagrees with the serialized plan.
Fields
record: StoredRecordSnapshot or genesis plan.
UnsupportedSchemaVersion
The store was written by a binary with a different, unsupported layout version.
Fields
RetiredSchemaVersion
The store was written in a retired layout whose operation log cannot be replayed.
Fields
UnrecognizedSchema
The file is SQLite but its tables are not a DPM store layout.
TargetExists
Backup and restore only ever create new files.
Io
A filesystem operation outside SQLite failed.
Fields
BackupIncomplete
The online backup did not copy every page in one step.
Fields
IntegrityCheckFailed
SQLite’s page-level integrity check reported damage.
HistoryDiscontinuity
Operation revisions do not form one consecutive chain.
Fields
SnapshotRevisionMismatch
The snapshot is not the state produced by the last recorded operation.
Fields
CorruptJson
A stored JSON field no longer decodes.
Fields
record: StoredRecordSnapshot or operation holding the field.
CorruptColumn
A stored column holds a value of the wrong type.
Fields
record: StoredRecordSnapshot or operation holding the field.
SequenceGap
Local append sequences skip a value, so an operation row was removed.
Fields
MissingHistory
No operation leads from the genesis plan to the snapshot.
Fields
MissingGenesis
A store has a snapshot but no genesis plan to replay its history from.
ReplayRefused
The engine refuses a recorded operation when the history is replayed from genesis.
Fields
source: EngineErrorEngine refusal.
ReplayDiverged
Replaying genesis and every operation does not reproduce the stored snapshot.
Fields
Lineage(LineageError)
The store’s lineage is missing, archived, or not the one the caller observed.
ForeignOperation
An operation belongs to a different workspace than the store’s genesis plan.
Fields
found: WorkspaceIdWorkspace the operation records.
expected: WorkspaceIdWorkspace of the genesis plan.
DuplicateOperation
The operation identity is already recorded; the caller decides whether the resend matches.
Fields
recorded: Box<HistoryEntry>The recorded operation with this identity.
InvalidTarget
Backup and restore targets must be a plain database file name in an existing directory.
Implementations§
Source§impl StoreError
impl StoreError
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()