pub trait AsyncHandler<S>:
RouteSpec
+ Send
+ Sync
+ 'static {
// Required method
fn handle_async(
&self,
request: Request,
params: PathParams,
connection: ConnectionInfo,
state: Arc<S>,
) -> HandlerFuture;
}Expand description
A typed handler for AsyncAppWithState (http2): the route macros make
one from an async fn, and from every sync typed handler too.
Required Methods§
fn handle_async( &self, request: Request, params: PathParams, connection: ConnectionInfo, state: Arc<S>, ) -> HandlerFuture
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".