#[non_exhaustive]pub enum StoreError {
CidMismatch {
claimed: Cid,
computed: Cid,
},
NotFound {
cid: Cid,
},
Io(String),
Corruption {
cid: String,
detail: String,
},
}Expand description
Errors from crate::store - blockstore operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CidMismatch
The CID attached to a put does not match a hash of the bytes.
Returned only by backends that choose to verify - the default
contract trusts the caller (ARCHITECTURE §3.1; see also the
Phase 1 risk review: re-hashing on every put is a hot-path tax).
NotFound
A CID referenced by a tree walk (lookup, cursor, diff, GC, …) is not present in the blockstore. Indicates a broken or partial tree.
Io(String)
Backend-specific I/O failure, translated into a string.
Corruption
On-disk content does not hash to the CID it is stored under.
Indicates silent disk corruption or a store-level bug (e.g. a
put_trusted caller that violated the safety contract).
The caller MUST treat this as an unrecoverable integrity failure
for the affected block.
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
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()