pub trait MessageBusBacking {
// Required methods
fn is_closed(&self) -> bool;
fn publish(&self, message: BusMessage);
fn close(&mut self);
// Provided method
fn take_receiver(&mut self) -> Result<MessageBusExternalReceiver> { ... }
}Expand description
External message bus backing facade.
Implementations own the concrete backing technology and provide the runtime-facing publication
surface used by the core bus. With the live feature, the same backing can also hand an
inbound receiver to the live bridge.
Required Methods§
Sourcefn publish(&self, message: BusMessage)
fn publish(&self, message: BusMessage)
Queues a serialized bus message for external egress.
Provided Methods§
Sourcefn take_receiver(&mut self) -> Result<MessageBusExternalReceiver>
fn take_receiver(&mut self) -> Result<MessageBusExternalReceiver>
Takes the inbound message receiver for live bridge consumption.
§Errors
Returns an error if the receiver has already been taken or is unavailable.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".