pub struct StreamHub { /* private fields */ }Expand description
扇出总线 — 将每个 emit 广播到所有注册的 sinks。
ParallelNode 的子分支 clone 父级的 Arc<StreamHub>,
子分支的 emit 自动汇聚到同一个消费者集合。
ExecutionEngine
│
├── StreamHub (fan-out bus)
│ ├── CLI sink
│ ├── Trace sink
│ └── AgentEvent sink
│
└── Parallel 子分支 clone Arc<StreamHub>
├── Branch A → emit → → StreamHub → all sinks
└── Branch B → emit → → StreamHub → all sinksStreamSink 不要求 Debug,故 StreamHub 也不 derive Debug。
Implementations§
Trait Implementations§
Source§impl StreamSink for StreamHub
impl StreamSink for StreamHub
Source§fn emit(&self, chunk: StreamChunk)
fn emit(&self, chunk: StreamChunk)
发射一个数据面事件。 Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StreamHub
impl !UnwindSafe for StreamHub
impl Freeze for StreamHub
impl Send for StreamHub
impl Sync for StreamHub
impl Unpin for StreamHub
impl UnsafeUnpin for StreamHub
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