pub trait Publisher {
// Required method
fn publish<E>(
&self,
message: E,
) -> impl Future<Output = Result<(), Error>> + Send
where E: Event + Clone + 'static;
}Expand description
Re-exported so services only need to depend on arminius-lib-nats.
The message-bus Subscriber trait
is intentionally not re-exported here to avoid clashing with the
async_nats::Subscriber re-export above; reach it via
arminius_lib_message_bus::Subscriber.
Publishes events to the message bus.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".