#[non_exhaustive]pub enum StoreError {
CidMismatch {
claimed: Cid,
computed: Cid,
},
NotFound {
cid: Cid,
},
Io(String),
}Expand description
Errors from crate::store - blockstore operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<StoreError> for Error
impl From<StoreError> for Error
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StoreError
impl RefUnwindSafe for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
impl UnwindSafe for StoreError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more