Enum git_checks_core::impl_prelude::CommitError
source · [−]#[non_exhaustive]
pub enum CommitError {
Git {
source: GitError,
},
FileName {
source: FileNameError,
},
CommitMetadata {
ref_: CommitId,
output: String,
},
CommitMetadataOutput {
output: String,
},
CommitMessage {
ref_: CommitId,
output: String,
},
RevList {
base_rev: CommitId,
merge_base: Option<CommitId>,
output: String,
},
AncestorCheck {
best_rev: CommitId,
merge_base: CommitId,
output: String,
},
MergeBase {
base: CommitId,
head: CommitId,
output: String,
},
DiffTree {
commit: CommitId,
base: Option<CommitId>,
output: String,
},
DiffPatch {
commit: CommitId,
base: Option<CommitId>,
path: PathBuf,
output: String,
},
}
Expand description
Errors which can occur when working with a commit for a check.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Git
Fields
source: GitError
The cause of the error.
Command preparation failure.
FileName
Fields
source: FileNameError
The cause of the error.
File name parsing failure.
CommitMetadata
Failure to extract commit metadata.
CommitMetadataOutput
Fields
output: String
Git’s actual output.
The commit metadata output did not match the expected format.
CommitMessage
Failure to extract commit message.
RevList
Failure to list revisions in a branch.
AncestorCheck
Fields
best_rev: CommitId
The commit being queried.
merge_base: CommitId
The merge base being tested.
output: String
Git’s output for the error.
Failure to check the ancestory in a branch.
MergeBase
Fields
base: CommitId
The base commit.
head: CommitId
The head of the topic.
output: String
Git’s output for the error.
Failure to determine the merge base between two commits.
DiffTree
Failure to tree diff of a commit.
DiffPatch
Fields
commit: CommitId
The commit being queried.
path: PathBuf
The path being queried.
output: String
Git’s output for the error.
Failure to get the patch of a commit.
Trait Implementations
sourceimpl Debug for CommitError
impl Debug for CommitError
sourceimpl Display for CommitError
impl Display for CommitError
sourceimpl Error for CommitError
impl Error for CommitError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<CommitError> for RunError
impl From<CommitError> for RunError
sourcefn from(source: CommitError) -> Self
fn from(source: CommitError) -> Self
Performs the conversion.
sourceimpl From<FileNameError> for CommitError
impl From<FileNameError> for CommitError
sourcefn from(source: FileNameError) -> Self
fn from(source: FileNameError) -> Self
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for CommitError
impl Send for CommitError
impl Sync for CommitError
impl Unpin for CommitError
impl UnwindSafe for CommitError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more