pub trait MessageHandler {
type Interface: Interface;
// Required method
fn handle_message(
&self,
message: Self::Interface,
) -> impl Future<Output = ()> + Send;
// Provided method
fn name() -> &'static str { ... }
}Expand description
Basic building block for composing services.
Required Associated Types§
Sourcetype Interface: Interface
type Interface: Interface
The message interface (see Service::Interface).
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".