pub enum GraphEvent<S: WorkflowState = State> {
GraphStart {
trace_id: TraceId,
},
NodeStart {
node_name: String,
trace_id: TraceId,
span_id: SpanId,
step: usize,
},
NodeEnd {
node_name: String,
trace_id: TraceId,
span_id: SpanId,
success: bool,
duration: Duration,
},
Node {
span_id: SpanId,
node_name: String,
event: FlowEvent,
},
BarrierWaiting {
barrier_id: BarrierId,
node_name: String,
span_id: SpanId,
},
BarrierResolved {
barrier_id: BarrierId,
decision: BarrierDecision,
},
ObservedError {
error: ObservedError,
node_name: String,
},
CheckpointSaved {
checkpoint_id: CheckpointId,
node_name: String,
step: usize,
},
GraphComplete {
result: GraphResult<S>,
},
GraphError {
error: GraphError,
state: S,
},
}Expand description
Variants§
GraphStart
Graph 执行开始(恰好一次)
NodeStart
节点开始执行
NodeEnd
节点执行完成
Node
节点内部事件(通过 FlowEvent 中间层)
BarrierWaiting
Barrier 暂停 — 等待外部审批信号。
BarrierResolved
Barrier 决策已应用
ObservedError
观测错误 — 不影响 control flow
CheckpointSaved
Checkpoint 已保存。
GraphComplete
Graph 执行完成(恰好一次)
Fields
§
result: GraphResult<S>GraphError
Graph 执行出错(恰好一次)
Trait Implementations§
Auto Trait Implementations§
impl<S = State> !RefUnwindSafe for GraphEvent<S>
impl<S = State> !UnwindSafe for GraphEvent<S>
impl<S> Freeze for GraphEvent<S>where
S: Freeze,
impl<S> Send for GraphEvent<S>
impl<S> Sync for GraphEvent<S>
impl<S> Unpin for GraphEvent<S>
impl<S> UnsafeUnpin for GraphEvent<S>where
S: UnsafeUnpin,
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