pub struct WorkflowEndPayload {
pub value: Value,
pub totals: WorkflowTotals,
}Expand description
Payload of EngineEvent::WorkflowEnd. Pairs the workflow’s
terminal output value with an aggregate WorkflowTotals rollup.
Serialized with a hand-written Serialize / Deserialize so the
wire stays bridge-compatible between the legacy (pre-#1173) shape
(payload = <bare-value>) and the new shape
(payload = {"value": <bare-value>, "total_input_tokens": N, ...}).
See the EngineEvent::WorkflowEnd doc for the disambiguation
rule.
Fields§
§value: ValueThe workflow’s final return value (the historical payload).
totals: WorkflowTotalsAggregate rollup across every TaskEnd in the workflow scope.
Implementations§
Source§impl WorkflowEndPayload
impl WorkflowEndPayload
Sourcepub fn new(value: Value) -> Self
pub fn new(value: Value) -> Self
Construct a payload from just a value (totals default to zero). Used by call sites that don’t have totals yet — they get the historical behaviour automatically.
Sourcepub fn with_totals(value: Value, totals: WorkflowTotals) -> Self
pub fn with_totals(value: Value, totals: WorkflowTotals) -> Self
Construct a payload with both value and totals.
Trait Implementations§
Source§impl Clone for WorkflowEndPayload
impl Clone for WorkflowEndPayload
Source§fn clone(&self) -> WorkflowEndPayload
fn clone(&self) -> WorkflowEndPayload
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 WorkflowEndPayload
impl Debug for WorkflowEndPayload
Source§impl Default for WorkflowEndPayload
impl Default for WorkflowEndPayload
Source§impl<'de> Deserialize<'de> for WorkflowEndPayload
impl<'de> Deserialize<'de> for WorkflowEndPayload
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Value> for WorkflowEndPayload
impl From<Value> for WorkflowEndPayload
Source§impl PartialEq for WorkflowEndPayload
impl PartialEq for WorkflowEndPayload
Source§fn eq(&self, other: &WorkflowEndPayload) -> bool
fn eq(&self, other: &WorkflowEndPayload) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WorkflowEndPayload
impl Serialize for WorkflowEndPayload
impl StructuralPartialEq for WorkflowEndPayload
Auto Trait Implementations§
impl Freeze for WorkflowEndPayload
impl RefUnwindSafe for WorkflowEndPayload
impl Send for WorkflowEndPayload
impl Sync for WorkflowEndPayload
impl Unpin for WorkflowEndPayload
impl UnsafeUnpin for WorkflowEndPayload
impl UnwindSafe for WorkflowEndPayload
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