pub enum ReducerEvent {
Started {
ts_ms: u64,
random: String,
input: Value,
usage_total: Usage,
},
TaskDone {
ts_ms: u64,
random: String,
step_id: String,
attempt: u32,
activity: String,
status: Status,
output: Option<Value>,
cause: Option<Cause>,
error: Option<String>,
usage: Usage,
usage_total: Usage,
},
Signal {
ts_ms: u64,
random: String,
step_id: String,
name: String,
payload: Value,
usage_total: Usage,
},
Timer {
ts_ms: u64,
random: String,
step_id: String,
usage_total: Usage,
},
ChildDone {
ts_ms: u64,
random: String,
step_id: String,
child_run_id: String,
status: Status,
output: Option<Value>,
usage_total: Usage,
},
}Expand description
What the reducer sees. The kernel translates journal headers into these; the
reducer never sees seq, random or lifecycle noise except where it needs them.
usage_total rides on every variant: it is the run’s banked total including this
event, so a reducer can decide on a budget without keeping its own tally
(see docs/workflows.md).
Variants§
Started
The run’s first event, delivered right after init(input).
Fields
TaskDone
A task reached succeeded or failed.
Fields
Signal
A signal was delivered to a parked step.
Fields
Timer
A timer fired.
Fields
ChildDone
A child run reached a terminal status.
Fields
Trait Implementations§
Source§impl Clone for ReducerEvent
impl Clone for ReducerEvent
Source§fn clone(&self) -> ReducerEvent
fn clone(&self) -> ReducerEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReducerEvent
impl Debug for ReducerEvent
Source§impl<'de> Deserialize<'de> for ReducerEvent
impl<'de> Deserialize<'de> for ReducerEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ReducerEvent
impl JsonSchema for ReducerEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ReducerEvent
impl PartialEq for ReducerEvent
Source§fn eq(&self, other: &ReducerEvent) -> bool
fn eq(&self, other: &ReducerEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ReducerEvent
impl Serialize for ReducerEvent
impl StructuralPartialEq for ReducerEvent
Auto Trait Implementations§
impl Freeze for ReducerEvent
impl RefUnwindSafe for ReducerEvent
impl Send for ReducerEvent
impl Sync for ReducerEvent
impl Unpin for ReducerEvent
impl UnsafeUnpin for ReducerEvent
impl UnwindSafe for ReducerEvent
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
Mutably borrows from an owned value. Read more