pub trait SimpleService {
type Interface: Interface;
// Required method
fn handle_message(
&self,
message: Self::Interface,
) -> impl Future<Output = ()> + Send;
}Expand description
A service that handles messages one at a time.
When the message handler cannot keep up with incoming messages, it applies backpressure into the input queue.
Required Associated Types§
Sourcetype Interface: Interface
type Interface: Interface
The message interface (see Service::Interface).
Required Methods§
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.