pub struct AgentChannel { /* private fields */ }Expand description
Agent communication channel
Implementations§
Source§impl AgentChannel
impl AgentChannel
Sourcepub fn send(&self, envelope: MessageEnvelope) -> Result<()>
pub fn send(&self, envelope: MessageEnvelope) -> Result<()>
Send a message on this channel
Sourcepub async fn receive(&self) -> Option<MessageEnvelope>
pub async fn receive(&self) -> Option<MessageEnvelope>
Receive a message from this channel (async, blocking)
Sourcepub async fn try_receive(&self) -> Option<MessageEnvelope>
pub async fn try_receive(&self) -> Option<MessageEnvelope>
Try to receive a message without blocking
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentChannel
impl !RefUnwindSafe for AgentChannel
impl Send for AgentChannel
impl Sync for AgentChannel
impl Unpin for AgentChannel
impl UnsafeUnpin for AgentChannel
impl !UnwindSafe for AgentChannel
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