#[non_exhaustive]pub enum StorageError {
Show 36 variants
RecordingDirectoryExists {
path: PathBuf,
},
InvalidConfiguration {
setting: &'static str,
reason: String,
},
DuplicateStateStream {
stream: String,
},
UnknownStateStream {
stream: String,
},
StateWriterClosed,
RecordingFinished,
RecordingDirectoryInUse {
path: PathBuf,
},
RecordingNotContinuable {
path: PathBuf,
},
RecordingConfigurationMismatch {
path: PathBuf,
reason: String,
},
IncompleteCheckpointStream {
stream: String,
reason: String,
},
NoCheckpointState {
stream: String,
},
NoRecordedState {
stream: String,
},
RecoveryConflict {
path: PathBuf,
reason: String,
},
OperationalTimestamp {
operation: &'static str,
source: Format,
},
OperationalDurationOverflow,
UnsupportedVersion {
path: PathBuf,
found: u32,
supported: u32,
},
InvalidMetadata {
path: PathBuf,
reason: String,
},
RecordingNotComplete {
path: PathBuf,
},
MissingChunk {
path: PathBuf,
},
ChunkSizeMismatch {
path: PathBuf,
expected: u64,
actual: u64,
},
ChecksumMismatch {
path: PathBuf,
expected: String,
actual: String,
},
InvalidRecord {
path: PathBuf,
line: u64,
reason: String,
},
StateAccess {
stream: String,
iteration: u64,
field: String,
source: StateError,
},
EncodeField {
stream: String,
iteration: u64,
field: String,
source: Error,
},
DuplicateDecoder {
field: String,
},
MissingDecoder {
field: String,
},
DecodeField {
stream: String,
iteration: u64,
field: String,
source: Box<dyn Error + Send + Sync + 'static>,
},
StateSeriesInvariant {
stream: String,
iteration: u64,
source: StateSeriesError,
},
Io {
operation: &'static str,
path: PathBuf,
source: Error,
},
Json {
operation: &'static str,
path: PathBuf,
source: Error,
},
ByteCountOverflow {
stream: String,
},
RecordTooLarge {
stream: String,
bytes: u64,
limit: u64,
},
OutOfOrderIteration {
stream: String,
iteration: u64,
previous: u64,
},
WriterQueueDisconnected,
StateWriterTerminated {
source: Arc<StorageError>,
},
StateWriterPanicked,
}Expand description
A failure encountered while encoding, writing, reading, or decoding a run.
Variants are grouped by the boundary that detects them: configuration and lifecycle, persisted-format validation, field processing, filesystem and JSON mechanics, and asynchronous writer coordination.
The enum is non-exhaustive so future integrity checks or durability modes can add precise variants without forcing downstream crates to exhaustively match every storage failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RecordingDirectoryExists
A new recording refused to replace an existing path.
Storage never silently overwrites a previous recording. Existing running recordings are accepted only through explicit continuation.
InvalidConfiguration
One storage setting violates a constructor invariant.
Settings represented by NonZero* types are rejected before this
point. This variant covers relationships between values, unsafe relative
paths, unsupported names, and similar semantic configuration failures.
Fields
DuplicateStateStream
Two logical output streams were configured with the same name.
UnknownStateStream
A caller selected a stream absent from the recording declaration.
StateWriterClosed
The recording-wide writer has stopped accepting new work.
RecordingFinished
A caller repeated a recording operation after successful termination.
RecordingDirectoryInUse
Another writer currently owns the recording directory.
RecordingNotContinuable
Explicit continuation was requested for a terminal recording.
RecordingConfigurationMismatch
Existing running configuration differs from the requested builder.
Fields
IncompleteCheckpointStream
A stream selected as a checkpoint omits part of the full state schema.
Fields
NoCheckpointState
No complete record exists from which a state can be reconstructed.
NoRecordedState
A completed stream contains no record to reconstruct.
RecoveryConflict
Chunk filenames do not describe one recoverable committed prefix and at most one highest open chunk.
Fields
OperationalTimestamp
The host UTC clock could not be represented in the canonical metadata timestamp format.
Fields
OperationalDurationOverflow
A monotonic writer session exceeded the exact persisted duration range.
UnsupportedVersion
metadata.json declares a format version this crate cannot read.
Fields
InvalidMetadata
Syntactically valid metadata violates a semantic storage invariant.
Fields
RecordingNotComplete
A reader requiring a completed recording encountered terminally unsuitable metadata.
MissingChunk
A committed chunk named by metadata is absent from the filesystem.
ChunkSizeMismatch
A committed chunk’s actual length differs from its metadata descriptor.
Fields
ChecksumMismatch
A committed chunk’s checksum differs from its metadata descriptor.
Fields
InvalidRecord
One syntactically readable JSONL record violates record invariants.
Fields
StateAccess
The encoder could not borrow one declared field from the live state.
Fields
source: StateErrorOriginal SystemState access failure.
EncodeField
Serde failed while encoding one borrowed payload.
Fields
DuplicateDecoder
A decoder registration attempted to reuse one field key.
MissingDecoder
No concrete payload decoder was declared for a persisted field key.
DecodeField
A user-supplied field decoder failed to reconstruct its concrete value.
Fields
StateSeriesInvariant
A reconstructed state violated its destination series invariant.
The rejected state is intentionally not retained in this error: it was created from persisted input and is dropped on failed reconstruction, preventing an error value from pinning arbitrarily large payloads.
Fields
source: StateSeriesErrorOriginal in-memory collection invariant failure.
Io
A filesystem operation failed.
Fields
Json
JSON framing, metadata serialization, or raw record parsing failed.
Fields
ByteCountOverflow
Exact byte accounting overflowed its u64 persisted representation.
RecordTooLarge
One indivisible record exceeds the stream’s strict queue-byte budget.
Returning immediately is essential: waiting for capacity can never make a record larger than the complete budget admissible.
Fields
OutOfOrderIteration
A stream submission did not advance its iteration.
Fields
WriterQueueDisconnected
The bounded recording queue disconnected before shutdown completed.
StateWriterTerminated
The recording worker terminated with an authoritative storage failure.
The shared source lets multiple blocked submitters observe the same terminal failure without cloning an IO or JSON error.
Fields
source: Arc<StorageError>Shared authoritative worker failure.
StateWriterPanicked
Joining a writer thread revealed an unexpected panic.
Trait Implementations§
Source§impl Debug for StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl Error for StorageError
impl Error for StorageError
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()