#[non_exhaustive]pub enum GitError {
DestinationNotEmpty(PathBuf),
NotARepository(PathBuf),
RefNotFound(String),
DirtyWorkingTree(PathBuf),
CloneFailed {
url: String,
detail: String,
},
FetchFailed(PathBuf, String),
CheckoutFailed {
ref: String,
detail: String,
},
Internal(String),
}Expand description
Errors produced by any crate::git::GitBackend implementation.
The enum is #[non_exhaustive] so future slices (credentials, submodules,
partial fetch) can add variants without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DestinationNotEmpty(PathBuf)
Clone was asked to populate a destination that already contains files.
NotARepository(PathBuf)
Operation was asked to act on a path that does not hold a git repo.
RefNotFound(String)
A ref (branch, tag, or SHA) could not be resolved in the repository.
DirtyWorkingTree(PathBuf)
Checkout refused because the working tree has uncommitted changes.
CloneFailed
Clone failed at the backend layer. detail carries the backend
message verbatim for operator diagnosis.
FetchFailed(PathBuf, String)
Fetch failed at the backend layer.
CheckoutFailed
Checkout of a resolved ref failed to apply to the working tree.
Fields
Internal(String)
Catch-all for unexpected backend errors. Carries the detail string so the caller can log or surface it without losing information.
Trait Implementations§
Source§impl Error for GitError
impl Error for GitError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for GitError
impl RefUnwindSafe for GitError
impl Send for GitError
impl Sync for GitError
impl Unpin for GitError
impl UnsafeUnpin for GitError
impl UnwindSafe for GitError
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