Skip to main content

RouteDispatchFn

Type Alias RouteDispatchFn 

Source
pub type RouteDispatchFn = fn(&mut dyn IHttpContext) -> Pin<Box<dyn Future<Output = Result<ResponseData, Error>> + Send + '_>>;
Expand description

The signature every route dispatch function implements.

It receives the live request context — headers, route parameters, claims and the body stream — and returns the response to write.