pub trait Handler<Ctx> {
    // Required method
    fn handle_message(
        &self,
        cx: Ctx,
        msg: BrokerMessage,
    ) -> impl Future<Output = Result<Result<(), String>>> + Send;
}

Required Methods§

Source

fn handle_message( &self, cx: Ctx, msg: BrokerMessage, ) -> impl Future<Output = Result<Result<(), String>>> + Send

Callback handled to invoke a function when a message is received from a subscription

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<H, C> Handler<C> for Instance<H, C>
where H: Handler, C: Send + Deref<Target = Span>,