#[non_exhaustive]pub enum GitError {
Show 20 variants
NotFound {
path: PathBuf,
},
RefNotFound {
refname: String,
},
RemoteNotFound {
name: String,
},
ConfigNotFound {
key: String,
},
AmbiguousRef {
refname: String,
},
AlreadyExists {
kind: &'static str,
name: String,
},
CheckedOutBranch {
name: String,
},
Conflict {
path: PathBuf,
},
DetachedHead,
InvalidLineRange {
start: usize,
end: usize,
},
InvalidPath {
path: String,
},
InvalidConfigKey {
key: String,
},
NoMergeBase {
a: String,
b: String,
},
SigningNotSupported,
InvalidTransport {
kind: String,
},
Network(String),
CommandFailed {
args: Vec<String>,
exit_code: Option<i32>,
stdout: String,
stderr: String,
stdout_truncated: bool,
stderr_truncated: bool,
},
InvalidOid {
value: String,
},
NotImplemented {
operation: &'static str,
},
Internal(Error),
}Expand description
Git domain errors.
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.
NotFound
Repository not found at path.
RefNotFound
Git reference not found.
RemoteNotFound
Remote not found.
ConfigNotFound
Config key not found.
AmbiguousRef
Ambiguous git reference.
AlreadyExists
Existing resource conflict.
CheckedOutBranch
Attempted to delete the currently checked out branch.
Conflict
Merge conflict in a file.
DetachedHead
HEAD is detached (not pointing to a branch).
InvalidLineRange
Invalid blame line range.
InvalidPath
Invalid repository path.
InvalidConfigKey
Invalid git config key.
NoMergeBase
No merge base exists between the two commits.
SigningNotSupported
Commit signing is not supported by the selected backend.
InvalidTransport
Unsupported transport configuration.
Network(String)
Network error during remote operations.
CommandFailed
Git CLI command failure.
Fields
InvalidOid
Invalid object ID string.
NotImplemented
Operation is intentionally not implemented.
Internal(Error)
Internal git2 error.
Trait Implementations§
Source§impl Error for GitError
impl Error for GitError
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 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
Mutably borrows from an owned value. Read more