pub enum StorageError {
Show 22 variants
Io {
op: &'static str,
path: PathBuf,
source: Error,
},
VersionAhead {
path: PathBuf,
v: u64,
},
Envelope {
path: PathBuf,
line: u64,
source: AxError,
},
Draft {
source: AxError,
},
CasMissing {
hash: String,
},
CasCorrupt {
hash: String,
path: PathBuf,
},
RangeOutOfBounds {
hash: String,
},
SeqMissing {
seq: u64,
},
Checkpoint {
op: &'static str,
detail: String,
},
SecretEgress {
locations: String,
},
Bundle {
op: &'static str,
detail: String,
},
Worktree {
op: &'static str,
detail: String,
},
WorktreeBusy {
name: String,
detail: String,
},
MergeStale {
name: String,
detail: String,
},
MergeWouldDiscard {
paths: Vec<String>,
},
Alias {
op: &'static str,
path: PathBuf,
kind: AliasKind,
},
NameTaken {
path: PathBuf,
},
LedgerHeld {
dir: PathBuf,
},
LedgerBroken {
dir: PathBuf,
at: Seq,
},
ChainHalted {
source: AxError,
},
Unproven,
Snapshot {
op: &'static str,
path: PathBuf,
source: Error,
},
}Expand description
Crate root error; crosses the crate boundary only via StorageError::into_ax.
Variants§
Io
VersionAhead
Envelope
Draft
CasMissing
CasCorrupt
RangeOutOfBounds
SeqMissing
Checkpoint
SecretEgress
Locations only. The matched bytes are never carried — proving a secret leaked by reprinting it would be the leak.
Bundle
An export or restore that is well-formed I/O but not a city: an occupied destination, a bundle whose manifest disagrees with what arrived, a chain with a gap.
Worktree
A tree that cannot be opened, added or pruned. Environment, not policy: the repository or the filesystem said no.
WorktreeBusy
A tree that cannot be granted now: the node already holds one, or granting it would cross the ceiling. Both are answered by giving a tree back, which is why they share a code.
MergeStale
A node’s work that no longer sits on top of the trunk. Not a storage fault: the work is intact, and whether it still applies is the question a machine must not answer by itself.
MergeWouldDiscard
A merge that would overwrite or delete a tracked file the person changed in the city folder and has not committed.
Alias
A name that is an alias. The family is refused whole (crates/storage/spec/Alias.lean
§8-25): a write through one lands where the name does not say.
NameTaken
Something already stands at the name a create asked for: the
file system answered at the moment of the write, so a second of
two racing creates meets this (crates/storage/spec/Alias.lean §8-32).
LedgerHeld
Another handle holds this city’s writer lock: a second process,
or a second ledger in this one (crates/storage/spec/Jsonl.lean §8-1).
LedgerBroken
A wave’s write or barrier failed, so what the disk holds past
at is unknown to this handle; only a reopen can judge it
(crates/storage/spec/Jsonl.lean §8-1).
ChainHalted
A whole-chain audit found a broken line, so this writer stopped
taking new lines; source is the audit’s own reason (8-30).
Unproven
This writer waits for the proof of the history it opened from, and writes nothing until the proof is whole (8-30).
Snapshot
The disk refused a snapshot read or write. A snapshot is a cache
the Ledger rebuilds, so its advice differs from Io’s (8-26).
Implementations§
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()