pub trait Handler<Ctx> {
// Required method
fn handle_message(
&self,
cx: Ctx,
msg: BrokerMessage,
) -> impl Future<Output = Result<Result<(), String>>> + Send;
}
Required Methods§
Sourcefn handle_message(
&self,
cx: Ctx,
msg: BrokerMessage,
) -> impl Future<Output = Result<Result<(), String>>> + Send
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.