pub enum GitClosureError {
Io(Error),
Parse(String),
HashMismatch {
expected: String,
actual: String,
},
ContentHashMismatch {
path: String,
expected: String,
actual: String,
},
SizeMismatch {
path: String,
expected: u64,
actual: u64,
},
UnsafePath(String),
MissingHeader(&'static str),
LegacyHeader,
CommandSpawnFailed {
command: &'static str,
source: Error,
},
CommandExitFailure {
command: &'static str,
status: String,
stderr: String,
},
}Expand description
Canonical error type returned by git-closure library operations.
Variants§
Io(Error)
Any filesystem or OS-level I/O failure.
Parse(String)
Snapshot syntax or semantic parse error.
HashMismatch
Top-level snapshot integrity mismatch.
This compares the header snapshot-hash against the hash recomputed
from all parsed entries.
ContentHashMismatch
Per-file content digest mismatch.
Unlike Self::HashMismatch, this indicates one specific file entry
had bytes whose SHA-256 does not match its declared :sha256 value.
Fields
SizeMismatch
Per-file decoded byte-size mismatch.
Fields
UnsafePath(String)
Path or symlink target failed safety checks.
MissingHeader(&'static str)
Required snapshot header is missing.
LegacyHeader
Legacy format-hash header encountered.
CommandSpawnFailed
External command could not be started.
Fields
CommandExitFailure
External command ran but returned a non-zero exit status.
Trait Implementations§
Source§impl Debug for GitClosureError
impl Debug for GitClosureError
Source§impl Display for GitClosureError
impl Display for GitClosureError
Source§impl Error for GitClosureError
impl Error for GitClosureError
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 GitClosureError
impl !RefUnwindSafe for GitClosureError
impl Send for GitClosureError
impl Sync for GitClosureError
impl Unpin for GitClosureError
impl UnsafeUnpin for GitClosureError
impl !UnwindSafe for GitClosureError
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