pub struct AgentBus { /* private fields */ }Expand description
通信总线核心结构体
Implementations§
Source§impl AgentBus
impl AgentBus
Sourcepub async fn register_channel(
&self,
agent_metadata: &AgentMetadata,
mode: CommunicationMode,
) -> Result<()>
pub async fn register_channel( &self, agent_metadata: &AgentMetadata, mode: CommunicationMode, ) -> Result<()>
为智能体注册通信通道
pub async fn send_message( &self, sender_id: &str, mode: CommunicationMode, message: &AgentMessage, ) -> Result<()>
pub async fn receive_message( &self, id: &str, mode: CommunicationMode, ) -> Result<Option<AgentMessage>>
pub async fn unsubscribe_topic(&self, id: &str, topic: &str) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentBus
impl !RefUnwindSafe for AgentBus
impl Send for AgentBus
impl Sync for AgentBus
impl Unpin for AgentBus
impl UnsafeUnpin for AgentBus
impl !UnwindSafe for AgentBus
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