pub enum FlowEvent {
NodeStarted {
node_id: String,
span_id: SpanId,
},
NodeCompleted {
node_id: String,
span_id: SpanId,
duration: Duration,
},
NodeFailed {
node_id: String,
error: String,
},
StateChanged {
node_id: String,
delta: StateDelta,
},
ParallelStarted {
node_id: String,
branch_count: usize,
span_id: SpanId,
},
ParallelCompleted {
node_id: String,
span_id: SpanId,
duration: Duration,
},
BranchCompleted {
branch_name: String,
node_id: String,
span_id: SpanId,
success: bool,
duration: Duration,
},
Custom {
node_id: String,
payload: Box<dyn Any + Send + Sync>,
},
}Expand description
节点内部事件 — 解耦的通用事件中间层。
Variants§
NodeStarted
节点开始执行
NodeCompleted
节点执行完成
NodeFailed
节点执行失败
StateChanged
状态变更
ParallelStarted
并行节点开始执行
ParallelCompleted
并行节点执行完成
BranchCompleted
并行分支执行完成
Custom
自定义事件 — 具体节点类型通过此变体注入内部事件。
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FlowEvent
impl !UnwindSafe for FlowEvent
impl Freeze for FlowEvent
impl Send for FlowEvent
impl Sync for FlowEvent
impl Unpin for FlowEvent
impl UnsafeUnpin for FlowEvent
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