pub enum RunStoreError {
Store(StoreError),
Run(RunError),
UnknownRun(RunId),
UnknownParent(RunId),
DuplicateRun {
recorded: Box<RunRecord>,
},
DuplicateEvent {
recorded: Box<LifecycleEntry>,
},
DuplicateActivity {
recorded: Box<ActivityEntry>,
},
ActivityExpired {
run: RunId,
source_sequence: u64,
high_water: u64,
},
ForeignRun {
run: RunId,
recorded: LineageId,
current: LineageId,
},
LinkConflict {
operation: OperationId,
linked: RunId,
},
WorkspaceMismatch {
path: PathBuf,
expected: WorkspaceId,
actual: WorkspaceId,
},
Corrupt {
path: PathBuf,
detail: String,
},
}Expand description
A run store operation that was refused or could not be completed.
Every refusal leaves the store as it was: writes are one transaction, and a file that cannot be trusted is never opened for writing.
Variants§
Store(StoreError)
The database, its layout, its lineage binding or a stored record failed.
Run(RunError)
The engine refuses the request: malformed, unauthorized or an illegal transition.
UnknownRun(RunId)
No run is recorded under this identity.
UnknownParent(RunId)
The named parent run is not recorded.
DuplicateRun
The run identity is already recorded with a different request.
DuplicateEvent
The transition identity is already recorded with different content.
Fields
recorded: Box<LifecycleEntry>The lifecycle fact recorded under this identity.
DuplicateActivity
The activity key is already recorded for the run with different content.
Fields
recorded: Box<ActivityEntry>The activity record stored under this key.
ActivityExpired
The activity record’s source sequence is at or below the run’s high-water mark and the store no longer holds it: either a retry of a record retention already removed, or a record that arrived out of order. Nothing was written, and the run’s receipt time did not move.
Fields
ForeignRun
The run was recorded under another lineage than the store’s current one, such as before a restore. It stays a historical observation: nothing new is written to it.
Fields
LinkConflict
The operation is already linked to another run.
WorkspaceMismatch
The run store belongs to another workspace than the project store it sits beside.
Fields
expected: WorkspaceIdWorkspace of the project store.
actual: WorkspaceIdWorkspace the run store is bound to.
Corrupt
Stored run data is inconsistent, so the store cannot be trusted as it is.
Implementations§
Source§impl RunStoreError
impl RunStoreError
Sourcepub fn is_corruption(&self) -> bool
pub fn is_corruption(&self) -> bool
Whether the stored data itself is damaged or inconsistent, as opposed to a refused request.
Trait Implementations§
Source§impl Debug for RunStoreError
impl Debug for RunStoreError
Source§impl Display for RunStoreError
impl Display for RunStoreError
Source§impl Error for RunStoreError
impl Error for RunStoreError
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()