Skip to main content

ActionReceipt

Struct ActionReceipt 

Source
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

Source

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.

Source

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”).

Source

pub fn inapplicable(&self) -> bool

The Action’s own when disproved this row, so it never ran.

Source

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.

Source

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

Source§

fn clone(&self) -> ActionReceipt

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ActionReceipt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ActionReceipt

Source§

impl PartialEq for ActionReceipt

Source§

fn eq(&self, other: &ActionReceipt) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ActionReceipt

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more