pub struct TokioMessageBus { /* private fields */ }Expand description
Concrete MessageBusPort backed by tokio::sync::mpsc channels.
Each TokioMessageBus instance holds one direction of communication.
Use MessageBusHandle to create a matched pair.
Trait Implementations§
Source§impl Debug for TokioMessageBus
impl Debug for TokioMessageBus
Source§impl MessageBusPort for TokioMessageBus
impl MessageBusPort for TokioMessageBus
Source§fn send<'life0, 'async_trait>(
&'life0 self,
msg: OutboundMessage,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
msg: OutboundMessage,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send an outbound message to the bus.
Source§fn recv<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<InboundMessage, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recv<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<InboundMessage, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive the next inbound message (blocks until available).
Auto Trait Implementations§
impl !Freeze for TokioMessageBus
impl !RefUnwindSafe for TokioMessageBus
impl Send for TokioMessageBus
impl Sync for TokioMessageBus
impl Unpin for TokioMessageBus
impl UnsafeUnpin for TokioMessageBus
impl UnwindSafe for TokioMessageBus
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