pub struct ActionReceipt {
pub label: Arc<str>,
pub steps: Arc<[StepResult]>,
pub skip: Option<Skip>,
pub finished_at: Timestamp,
pub running: Option<RunningStep>,
}Expand description
The most recent Action run against this Entity: a receipt of something Repon did,
not a reading of the world, read by the row summary fold
(docs/spec/actions.md,
ADR 0018).
Deliberately outside the Cell machinery this module otherwise builds on: crate::snapshot’s
private FoldableCell trait, the only way a value ever joins the row fold’s Cell array, is
implemented once, generically, for Cell<T> alone, and is not visible outside crate::snapshot
at all, so nothing in this module could implement it even by mistake. A receipt carries no
Generation, never goes stale on the metadata poll, is never superseded (there is no older
or newer receipt to compare against, only the latest one), and the vanished-staleness
path’s own exhaustive destructure names this field only to skip it (last_action: _),
leaving it exactly as it was. It also never persists: it lives in memory for the session
and dies with the process, which satisfies “keep until the next run” with no key, no clock
and no expiry; the
configurable-expiry half of the recorded requirement is dropped outright on the startup-cost
grounds docs/spec/actions.md measures, not deferred.
Fields§
§label: Arc<str>The Action’s name, or the typed command string.
steps: Arc<[StepResult]>The steps that have finished so far, in order. Empty when skip is Some, and not
yet the whole Action’s step list while running is Some: a step neither finished
nor currently executing has no representation here at all
(docs/spec/actions.md’s “The run on screen”).
skip: Option<Skip>Why this row carries no steps, or None for a row that actually ran
(Skip, docs/spec/actions.md’s “The Selection and the gate”).
finished_at: Timestamp§running: Option<RunningStep>The step executing right now, or None once every step has finished (or none ever
ran, as for a receipt carrying skip). Core::run_action writes this receipt to
the table once per step, so a reader sees it update as the run progresses rather
than only once at the very end.
The grain is the step, not the byte: a running step’s own captured output is not
here, because executor::run_step returns it only once the child has exited. A
reader sees a step’s label, its spinner and its live elapsed time immediately, and
its output the instant that step ends, rather than mid-step. Streaming that would
mean drain_until_exit publishing incremental snapshots.
steps therefore holds only finished steps while this is Some, which is what
keeps ActionReceipt::failed honest mid-run. Nothing may read this receipt’s
presence as “the run is over”; read running.is_none() for that.
Implementations§
Source§impl ActionReceipt
impl ActionReceipt
Sourcepub fn failed(&self) -> bool
pub fn failed(&self) -> bool
Whether any step in this run failed, which is what widens the row summary fold
even though every Cell reads fine
(docs/spec/core-api.md’s “row summary”, docs/spec/actions.md’s “Where the
result lives”). A NotRun or Cancelled step never counts, only a genuine
Failed one.
Sourcepub fn not_applicable(&self) -> bool
pub fn not_applicable(&self) -> bool
An excluded row that was in the Selection: nothing failed and nothing was blocked,
the row was simply never operated on. The one legitimate producer of Not applicable (docs/spec/actions.md’s “The Selection and the gate”).
Sourcepub fn inapplicable(&self) -> bool
pub fn inapplicable(&self) -> bool
The Action’s own when disproved this row, so it never ran.
Sourcepub fn unresolved(&self) -> bool
pub fn unresolved(&self) -> bool
The Action’s own when could not settle on this row, so it never ran either: not
excluded, not disproved, and not operated on.
Sourcepub fn refused(&self) -> bool
pub fn refused(&self) -> bool
Whether this run refused rather than acted: a step Repon performed itself would not
act and none failed. Neither a success nor a failure, so it leaves the row summary
fold alone and earns its own word in the detail pane and its own action: Filter
value (docs/spec/actions.md’s
OwnWork).
Trait Implementations§
Source§impl Clone for ActionReceipt
impl Clone for ActionReceipt
Source§fn clone(&self) -> ActionReceipt
fn clone(&self) -> ActionReceipt
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 ActionReceipt
impl Debug for ActionReceipt
impl Eq for ActionReceipt
Source§impl PartialEq for ActionReceipt
impl PartialEq for ActionReceipt
impl StructuralPartialEq for ActionReceipt
Auto Trait Implementations§
impl Freeze for ActionReceipt
impl RefUnwindSafe for ActionReceipt
impl Send for ActionReceipt
impl Sync for ActionReceipt
impl Unpin for ActionReceipt
impl UnsafeUnpin for ActionReceipt
impl UnwindSafe for ActionReceipt
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