pub enum Error {
NotARepo(PathBuf),
CasConflict {
refname: String,
expected: Option<Oid>,
found: Option<Oid>,
},
PreconditionFailed {
path: String,
expected: Option<Oid>,
found: Option<Oid>,
},
Git(Error),
Io(Error),
Other(String),
}Expand description
Errors from the git write substrate.
Variants§
NotARepo(PathBuf)
The vault root is not a git repository (feature is git-gated).
CasConflict
A compare-and-swap on a ref failed: the ref moved since we read it. The changeset applied nothing; the caller should re-read and retry or surface a conflict (the reconsideration domino).
PreconditionFailed
A per-file precondition failed: the blob at path in the base tree is not
what the caller read (it changed underneath the changeset). The whole
changeset aborts with nothing applied — the multi-file CAS / the
reconsideration domino. The caller re-reads the affected paths and
re-decides.
Git(Error)
Underlying libgit2 error.
Io(Error)
Filesystem error (working-tree materialization, etc.).
Other(String)
Invariant violation or unsupported state with a description.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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