pub enum EngineFailureCode {
ConfigInvalid,
CoreIncomplete,
ContentUnavailable,
PolicyIncomplete,
PatchInvalid,
PatchConflict,
FixCycle,
FixPassLimit,
TransactionFailed,
IndexLockUnprovenOwner,
}Expand description
What:
The stable causes of an engine failure this foundation and its successors report.
#[derive(...)] generates copying,
debug printing and ==.
Why:
A closed set keeps the wire spelling in one place.
Codes that described
plugins and trust are not carried over.
A shipped policy that could not finish
is reported by cause:
ContentUnavailable when something it had to read could
not be read,
PolicyIncomplete when its own machinery failed.
In TS you’d write (pseudocode):
type EngineFailureCode = 'config-invalid' | 'core-incomplete' | ... | 'index-lock-unproven-owner';Variants§
ConfigInvalid
Configuration could not be read or validated, including legacy files needing migration.
CoreIncomplete
A fixed transform failed unexpectedly.
Something a policy or lifecycle had to read could not be read: a candidate’s bytes, a repository fact asked of Git, or transaction state. The policy itself is intact; its input is missing.
PolicyIncomplete
A shipped policy’s own machinery failed,
so the policy could not finish although
its input was readable:
its rules file could not be loaded,
its linter could not
start,
or it hit an internal error.
An unreadable candidate or repository fact is
ContentUnavailable instead.
PatchInvalid
A proposed patch was not valid.
PatchConflict
A proposed patch no longer applied.
FixCycle
Fixing revisited an earlier state.
FixPassLimit
Fixing did not settle within the pass limit.
TransactionFailed
A commit transaction could not complete.
IndexLockUnprovenOwner
A foreign index.lock with an unproven owner outlasted the wait budget.
Trait Implementations§
Source§impl Clone for EngineFailureCode
impl Clone for EngineFailureCode
impl Copy for EngineFailureCode
Source§impl Debug for EngineFailureCode
impl Debug for EngineFailureCode
impl Eq for EngineFailureCode
Source§impl PartialEq for EngineFailureCode
impl PartialEq for EngineFailureCode
impl StructuralPartialEq for EngineFailureCode
Auto Trait Implementations§
impl Freeze for EngineFailureCode
impl RefUnwindSafe for EngineFailureCode
impl Send for EngineFailureCode
impl Sync for EngineFailureCode
impl Unpin for EngineFailureCode
impl UnsafeUnpin for EngineFailureCode
impl UnwindSafe for EngineFailureCode
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