pub trait HandlerFn: Send + Sync {
// Required method
fn call(&self, req: HttpRequest) -> Box<dyn Response>;
}Expand description
A generic trait to allow many different types of handlers to be passed into our http server
pub trait HandlerFn: Send + Sync {
// Required method
fn call(&self, req: HttpRequest) -> Box<dyn Response>;
}A generic trait to allow many different types of handlers to be passed into our http server