#[non_exhaustive]pub struct OperatorOutput {
pub message: Content,
pub exit_reason: ExitReason,
pub metadata: OperatorMetadata,
pub effects: Vec<Effect>,
}Expand description
Output from an operator. Contains the response, metadata about execution, and any side-effects the operator wants executed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: ContentThe operator’s response content.
exit_reason: ExitReasonWhy the operator invocation ended.
metadata: OperatorMetadataExecution metadata (cost, tokens, timing).
effects: Vec<Effect>Side-effects the operator wants executed.
CRITICAL DESIGN DECISION: The operator declares effects but does not execute them. The calling layer (orchestrator, lifecycle coordinator) decides when and how to execute them. This is what makes the operator runtime independent of the layers around it.
An operator running in-process has its effects executed immediately. An operator running in a Temporal activity has its effects serialized and executed by the workflow. Same operator code, different execution.
Implementations§
Source§impl OperatorOutput
impl OperatorOutput
Sourcepub fn new(message: Content, exit_reason: ExitReason) -> Self
pub fn new(message: Content, exit_reason: ExitReason) -> Self
Create a new OperatorOutput with required fields.
Trait Implementations§
Source§impl Clone for OperatorOutput
impl Clone for OperatorOutput
Source§fn clone(&self) -> OperatorOutput
fn clone(&self) -> OperatorOutput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more