pub struct ActionBus { /* private fields */ }Expand description
动作总线
包含两条独立通道:
- raw_events: collector 向 core 推送已贴上 SourceTier 的原始事件
- intents: agent 向 core 回传意图批次
Implementations§
Source§impl ActionBus
impl ActionBus
pub fn new(capacity: usize) -> Self
Sourcepub fn raw_sender(&self) -> Sender<IngestedRawEvent>
pub fn raw_sender(&self) -> Sender<IngestedRawEvent>
获取原始事件发送端的克隆(给 collector 任务)
Sourcepub fn intent_sender(&self) -> Sender<IntentBatch>
pub fn intent_sender(&self) -> Sender<IntentBatch>
获取意图发送端的克隆(给 agent 任务)
Sourcepub async fn recv_raw(&mut self) -> Option<IngestedRawEvent>
pub async fn recv_raw(&mut self) -> Option<IngestedRawEvent>
阻塞等待下一个原始事件(处理管道独占调用)
Sourcepub async fn recv_intent(&mut self) -> Option<IntentBatch>
pub async fn recv_intent(&mut self) -> Option<IntentBatch>
阻塞等待下一个意图批次(策略审查独占调用)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ActionBus
impl RefUnwindSafe for ActionBus
impl Send for ActionBus
impl Sync for ActionBus
impl Unpin for ActionBus
impl UnsafeUnpin for ActionBus
impl UnwindSafe for ActionBus
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