#[non_exhaustive]pub enum GitCliBackendError {
GitCommand {
source: Error,
program: OsString,
args: Vec<OsString>,
},
GitExitStatus {
status: ExitStatus,
},
InvalidUtf8 {
source: Utf8Error,
},
InvalidGitStatus {
entry: Vec<u8>,
},
InvalidRevParse {
output: Vec<u8>,
},
NoGitDirParent {
git_dir: PathBuf,
},
NoWorktreeForGitDir {
git_dir: PathBuf,
},
}Available on crate feature
git-cli only.Expand description
Errors returned by git-cli backend operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
GitCommand
Executing a git command failed.
Fields
GitExitStatus
A git command returned a non-zero exit status.
Fields
§
status: ExitStatusThe exit status returned by the git command.
InvalidUtf8
Converting the output of a git command to UTF-8 failed.
InvalidGitStatus
An invalid status entry was encountered in the output of git status.
InvalidRevParse
An invalid rev-parse output was encountered.
NoGitDirParent
A path was expected to have a parent directory, but it did not.
NoWorktreeForGitDir
No worktree listed by Git matched the repository administrative directory.
Trait Implementations§
Source§impl Debug for GitCliBackendError
impl Debug for GitCliBackendError
Source§impl Display for GitCliBackendError
impl Display for GitCliBackendError
Source§impl Error for GitCliBackendError
impl Error for GitCliBackendError
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()
Source§impl ErrorCompat for GitCliBackendError
impl ErrorCompat for GitCliBackendError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl From<GitCliBackendError> for ModifyGuardError
impl From<GitCliBackendError> for ModifyGuardError
Source§fn from(source: GitCliBackendError) -> Self
fn from(source: GitCliBackendError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for GitCliBackendError
impl !UnwindSafe for GitCliBackendError
impl Freeze for GitCliBackendError
impl Send for GitCliBackendError
impl Sync for GitCliBackendError
impl Unpin for GitCliBackendError
impl UnsafeUnpin for GitCliBackendError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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