pub trait Handler<State>:
Send
+ Sync
+ 'static {
// Required method
fn call(
&self,
ctx: RequestContext,
state: Arc<State>,
) -> Pin<Box<dyn Future<Output = Response> + Send + 'static>>;
}Expand description
Handler for a RESP command.
Required Methods§
fn call( &self, ctx: RequestContext, state: Arc<State>, ) -> Pin<Box<dyn Future<Output = Response> + Send + 'static>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".