pub enum Error {
Missing,
Verification,
Io(String),
GcRefuse,
KeyInvalid,
RegistryFull,
}Expand description
The store error family — one enum with members at two altitudes (store-api.md §Error model; ADR-012 §6.5, §1).
Variants§
Missing
Key absent, on ops that signal absence via Err:
read_range and delete (ADR-012 §6.5 ruling 5;
store-api.md §Error model).
A miss on get and stat is a value, not an error — they
signal absence with None and never carry Missing. The
facade’s read paths enforce this behaviorally: both-tier misses
resolve Ok(None) on get/stat (see src/store/read.rs and the
read-path tests pinning the miss shapes — src/store/tests.rs,
tests/conformance/rows.rs; ADR-012 §6.5 ruling 5;
store-api.md §Error model).
Verification
Put/get hash-check failure: content does not match the key under the canonical derivation (store-api.md §Error model).
Io(String)
Backend media failure (store-api.md §Error model), covering
cursor and staged-put I/O errors surfaced through the same
trait error family — stringly because std::io::Error is not
stable across versions.
GcRefuse
Direct delete refused: the key is protected — pinned, registered-source-live, or protect-callback-named — and nothing was deleted (ADR-005’s delete-window arbitration at delete time; ADR-012 §1/§4).
Never fires below the facade: arbitration answers flow up as
data, and the facade decides and owns the refusal (one enum,
both altitudes; store-api.md §Error model). Named GcRefuse
per ADR-012 §1 — there is no sweep-abort error.
KeyInvalid
Malformed key bytes at the boundary — truncated, unknown
algorithm (ADR-002/hashing): rejects, never guesses
(store-api.md §Error model). KeyInvalid never fires at the
Backend trait boundary, where keys arrive
opaque (one enum, both altitudes).
RegistryFull
The pin-token registry’s admission refusal (ADR-019): a mint
at or past the registry’s admission cap — no token issued, no
insertion (never an eviction), a custodial guard dropped, no
custody taken. Ops-layer only (the registry is ops-layer
state): it never fires below the facade, and like GcRefuse
it is refusal-shaped — nothing happened, here is why.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()