pub trait Handler<Args>:
Clone
+ Send
+ Sync
+ 'static {
// Required method
fn call(
self,
parts: Parts,
body: Bytes,
) -> Pin<Box<dyn Future<Output = Response<BoxBody>> + Send>>;
}Expand description
A handler that can process an HTTP request and produce a response.
Implemented automatically for async functions whose arguments are
extractors. The Args type parameter encodes the extractor tuple
and is used for trait resolution — users don’t specify it directly.
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.