pub struct MessageBusHandle { /* private fields */ }Expand description
Handle that owns both sides of a message bus channel pair.
Destructure into TokioMessageBus (agent side) and BotSideBus
(bot side) for independent use.
Implementations§
Source§impl MessageBusHandle
impl MessageBusHandle
Sourcepub fn split(self) -> (TokioMessageBus, BotSideBus)
pub fn split(self) -> (TokioMessageBus, BotSideBus)
Consume the handle and return both ports.
Sourcepub fn agent_port(&self) -> &TokioMessageBus
pub fn agent_port(&self) -> &TokioMessageBus
Get a reference to the agent-side port.
Sourcepub fn bot_port(&mut self) -> &mut BotSideBus
pub fn bot_port(&mut self) -> &mut BotSideBus
Get a mutable reference to the bot-side port.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MessageBusHandle
impl !RefUnwindSafe for MessageBusHandle
impl Send for MessageBusHandle
impl Sync for MessageBusHandle
impl Unpin for MessageBusHandle
impl UnsafeUnpin for MessageBusHandle
impl UnwindSafe for MessageBusHandle
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