pub trait Handler {
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
req: Request,
params: Params
) -> Pin<Box<dyn Future<Output = Response> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Exports HTTP Router items. An HTTP request handler.
This trait is automatically implemented for Fn
types, and so is rarely implemented
directly by Spin users.