pub enum VcsError {
HashMismatch {
expected: SnapshotId,
actual: SnapshotId,
},
UncommittedChanges {
count: usize,
},
InvalidSnapshotId(String),
InvalidBranchName(String),
InvalidRemoteName(String),
Storage(String),
Json(Error),
Io(Error),
Internal(String),
}Expand description
Errors that can occur in the khive VCS layer (snapshot hashing, NDJSON sync, remote fetch).
Variants§
HashMismatch
The archive stored at the remote has a different hash than expected. Indicates corruption or tampering.
UncommittedChanges
checkout was blocked because there are uncommitted changes.
Pass force: true to discard them.
InvalidSnapshotId(String)
A SnapshotId string failed validation.
InvalidBranchName(String)
A branch name failed validation (must match ^[a-zA-Z0-9_-]{1,64}$).
InvalidRemoteName(String)
A remote name failed validation (must be a single path segment
matching [A-Za-z0-9._-]+, and not . or ..). Rejected before any
filesystem path is built from it, to prevent path traversal into
.khive/kg/remotes/.
Storage(String)
An underlying storage operation failed.
Json(Error)
JSON serialization or deserialization failed.
Io(Error)
An I/O operation failed (file system).
Internal(String)
An unexpected internal error.
Trait Implementations§
Source§impl Error for VcsError
impl Error for VcsError
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()
Source§impl From<RuntimeError> for VcsError
impl From<RuntimeError> for VcsError
Source§fn from(e: RuntimeError) -> Self
fn from(e: RuntimeError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for VcsError
impl !UnwindSafe for VcsError
impl Freeze for VcsError
impl Send for VcsError
impl Sync for VcsError
impl Unpin for VcsError
impl UnsafeUnpin for VcsError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more