pub enum StepOutcome {
Ok,
Failed(i32),
NotRun,
Cancelled,
OwnWork(OwnWork),
}Expand description
One step’s own outcome: a closed set of exactly five
(docs/spec/actions.md’s
“Step outcomes”). No wildcard arm ever matches this: a sixth variant must be named at
every match site or the crate fails to compile.
The first four are a child process’s. OwnWork is the step Repon performed itself, with
no child process anywhere in it, which is what lets a Management operation leave a receipt
instead of borrowing an outcome that means something else
(repo-management.md’s
“Receipts”).
Cancelled is explicitly not a failure and is never themed as one, following
ADR 0013’s
precedent that interrupted work becomes Unknown rather than Failed; Self::is_failure
is the one place that classification lives; a match on the five variants should still
name each one rather than borrow this method to skip a step, since the two calls answer
different questions.
Variants§
Ok
Ran and exited zero.
Failed(i32)
Ran and exited nonzero; the code is carried.
NotRun
An earlier step failed, so this one never started.
Cancelled
The run was cancelled before this step finished, or before it started.
OwnWork(OwnWork)
No child process ran: Repon did this step itself, and says so in its own words.
Implementations§
Source§impl StepOutcome
impl StepOutcome
Sourcepub fn is_failure(&self) -> bool
pub fn is_failure(&self) -> bool
Whether this outcome counts as a failure for the row summary fold: Failed and own
work Repon could not finish, never Cancelled, NotRun, Ok or a refusal. One arm
per variant, no catch-all, so a sixth variant must be classified here or the crate
fails to compile, rather than silently falling through as a non-failure.
Sourcepub fn is_refusal(&self) -> bool
pub fn is_refusal(&self) -> bool
Whether this outcome is a step Repon performed itself that would not act. Kept beside
Self::is_failure so the two classifications the fold, the pane and the action:
Filter term all read live in one place and cannot disagree.
Trait Implementations§
Source§impl Clone for StepOutcome
impl Clone for StepOutcome
Source§fn clone(&self) -> StepOutcome
fn clone(&self) -> StepOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StepOutcome
impl Debug for StepOutcome
impl Eq for StepOutcome
Source§impl PartialEq for StepOutcome
impl PartialEq for StepOutcome
impl StructuralPartialEq for StepOutcome
Auto Trait Implementations§
impl Freeze for StepOutcome
impl RefUnwindSafe for StepOutcome
impl Send for StepOutcome
impl Sync for StepOutcome
impl Unpin for StepOutcome
impl UnsafeUnpin for StepOutcome
impl UnwindSafe for StepOutcome
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§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