pub trait Handler<St, T>: 'staticwhere
St: State,{
type Output: Responder<St>;
// Required method
async fn call(&self, param: T) -> Self::Output;
}Expand description
Async fn handler.
Implemented for async functions and closures that take up to 16
extractors. T is the tuple of extractor types. Register such handlers with
Route::to(). Use HandlerSt when the handler
needs the application or request state.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".