pub trait Handler {
type Input: ?Sized;
type Context: ?Sized;
type Output;
type Error;
// Required method
fn handle(
&self,
input: &Self::Input,
context: &mut Self::Context,
) -> Result<Self::Output, Self::Error>;
}Expand description
Executes a selected dispatch-table item.
The input is immutable. Mutable runtime state, services, buffers, or device
handles should be placed in Self::Context. Implementations that do not
need a context can use ().
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".