Skip to main content

extract_output

Macro extract_output 

Source
extract_output!() { /* proc-macro */ }
Expand description

Extract step output with type safety and error handling

Note: This proc-macro provides guidance but doesn’t implement a declarative macro. Use the StepOutput trait for type-safe extraction instead.

§Example

// Type-safe extraction using StepOutput derive
#[derive(StepOutput)]
struct ValidateAndCreateTradeOutput {
    trade_id: Uuid,
    amount: f64,
}

let output = ValidateAndCreateTradeOutput::from_context(ctx, "ValidateAndCreateTrade")?;
let trade_id = output.trade_id;

// Or access raw JSON
let raw_output = ctx.get_step_output("ValidateAndCreateTrade");