pub enum CandidateFailure {
Show 14 variants
GitNotStarted,
GitFailed,
ListingMalformed,
UnsupportedMode,
UnsupportedStatus,
UnmergedPath,
ReaderEnded,
ReplyMalformed,
ReplyTruncated,
ReplyMismatched,
ObjectMissing,
ObjectKindUnexpected,
StaleCandidate,
PrivateIndexUnavailable,
}Expand description
What:
Why candidate listing or reading failed.
#[derive(...)] generates copying,
debug printing and ==.
Why:
The policy engine maps causes to engine-failure codes,
and tests name the
exact cause instead of matching diagnostic wording.
In TS you’d write (pseudocode):
type CandidateFailure = 'git-not-started' | 'git-failed' | 'listing-malformed' | ...;Variants§
GitNotStarted
The real Git program could not be started at all.
GitFailed
A listing command ran and exited unsuccessfully.
ListingMalformed
Listing output is not the NUL-delimited record format Git 2.56.0 prints.
UnsupportedMode
A listed entry has a file mode no candidate can carry.
UnsupportedStatus
A listed entry has a change status this layer does not interpret.
UnmergedPath
The index holds a conflicted (unmerged) entry.
ReaderEnded
The object reader ended, or was closed after an earlier failure.
ReplyMalformed
An object reply does not follow the cat-file --batch format.
ReplyTruncated
An object reply stopped before its declared size or terminator.
ReplyMismatched
An object reply names a different object than the one requested.
ObjectMissing
Git reported the requested object as missing.
ObjectKindUnexpected
The requested object exists with a type the caller cannot use.
StaleCandidate
A candidate belongs to a version that was invalidated.
The private index copy a prediction stages into could not be created or copied.
Trait Implementations§
Source§impl Clone for CandidateFailure
impl Clone for CandidateFailure
impl Copy for CandidateFailure
Source§impl Debug for CandidateFailure
impl Debug for CandidateFailure
impl Eq for CandidateFailure
Source§impl PartialEq for CandidateFailure
impl PartialEq for CandidateFailure
impl StructuralPartialEq for CandidateFailure
Auto Trait Implementations§
impl Freeze for CandidateFailure
impl RefUnwindSafe for CandidateFailure
impl Send for CandidateFailure
impl Sync for CandidateFailure
impl Unpin for CandidateFailure
impl UnsafeUnpin for CandidateFailure
impl UnwindSafe for CandidateFailure
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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