pub enum StoreError {
Io(Error),
HashMismatch {
expected: Oid,
actual: Oid,
},
}Expand description
Things that can go wrong while inserting an object.
Reads from the store (Store::open, Store::contains, and others)
return a plain io::Error. This enum is only surfaced by the
insert paths because they have a non-IO failure mode (hash
mismatch) that needs its own variant.
Variants§
Io(Error)
Filesystem-level failure.
Surfaced by operations like tempfile creation, write, rename, permission, etc.
HashMismatch
Store::insert_verified received bytes that hashed to
something other than the OID the caller asserted.
The tempfile is dropped, so no half-committed object is left behind.
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
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()
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