cot 0.6.0

The Rust web framework for lazy developers.
Documentation
error[E0277]: `fn(()) -> impl Future<Output = Result<cot::http::Response<Body>, cot::Error>> {test}` is not a valid request handler
 --> tests/ui/unimplemented_request_handler.rs:8:57
  |
8 |     let _ = Router::with_urls([Route::with_handler("/", test)]);
  |                                -------------------      ^^^^ not a valid request handler
  |                                |
  |                                required by a bound introduced by this call
  |
  = help: the trait `RequestHandler<_>` is not implemented for fn item `fn(()) -> impl Future<Output = Result<cot::http::Response<Body>, cot::Error>> {test}`
  = note: make sure the function is marked `async`
  = note: make sure all parameters implement `FromRequest` or `FromRequestHead`
  = note: make sure there is at most one parameter implementing `FromRequest`
  = note: make sure the function takes no more than 10 parameters
  = note: make sure the function returns a type that implements `IntoResponse`
help: the following other types implement trait `RequestHandler<T>`
 --> src/router/method/openapi.rs
  |
  |   impl RequestHandler for ApiMethodRouter {
  |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ApiMethodRouter` implements `RequestHandler`
  |
 ::: src/router/method.rs
  |
  |   impl RequestHandler for MethodRouter {
  |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MethodRouter` implements `RequestHandler`
  |
 ::: src/openapi.rs
  |
  | / impl<HandlerParams, H> RequestHandler<HandlerParams> for NoApi<H>
  | | where
  | |     H: RequestHandler<HandlerParams>,
  | |_____________________________________^ `cot::openapi::NoApi<H>` implements `RequestHandler<HandlerParams>`
note: required by a bound in `Route::with_handler`
 --> src/router.rs
  |
  |     pub fn with_handler<HandlerParams, H>(url: &str, handler: H) -> Self
  |            ------------ required by a bound in this associated function
...
  |         H: RequestHandler<HandlerParams> + Send + Sync + 'static,
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Route::with_handler`