httpageboy 1.0.13

A lightweight library for handling raw HTTP request/response transmission. Good base for APIs. Supports both synchronous and asynchronous programming models.
Documentation
f@http-server: cargo build --features async_tokio
   Compiling httpageboy v1.0.12 (/datos/code/numano/eqeqo/bazoj/http-server)
error[E0308]: mismatched types
  --> src/core/handler.rs:15:3
   |
14 |   pub fn sync_handler_adapter(h: fn(&Request) -> Response) -> Handler {
   |                                                               ------- expected `fn(&Request) -> Pin<Box<...>>` because of return type
15 | /   Box::new(move |req: &Request| {
16 | |     let resp = h(req);
17 | |     Box::pin(async move { resp })
18 | |   })
   | |____^ expected fn pointer, found `Box<{closure@handler.rs:15:12}>`
   |
   = note: expected fn pointer `for<'a> fn(&'a request::Request) -> Pin<Box<(dyn Future<Output = Response> + Send + 'static)>>`
                  found struct `Box<{closure@src/core/handler.rs:15:12: 15:32}>`
   = note: the full name for the type has been written to '/datos/code/numano/eqeqo/bazoj/http-server/target/debug/deps/httpageboy-3f6c4ff88810568b.long-type-5526915227308062899.txt'
   = note: consider using `--verbose` to print the full type name to the console

error[E0308]: mismatched types
   --> src/core/request.rs:381:19
    |
381 |       return Some((rh.handler)(self));
    |              ---- ^^^^^^^^^^^^^^^^^^ expected `Response`, found `Pin<Box<...>>`
    |              |
    |              arguments to this enum variant are incorrect
    |
    = note: expected struct `Response`
               found struct `Pin<Box<(dyn Future<Output = Response> + Send + 'static)>>`
help: the type constructed contains `Pin<Box<(dyn Future<Output = Response> + Send + 'static)>>` due to the type of the argument passed
   --> src/core/request.rs:381:14
    |
381 |       return Some((rh.handler)(self));
    |              ^^^^^------------------^
    |                   |
    |                   this argument influences the type of `Some`
note: tuple variant defined here
   --> /home/f/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:580:5
    |
580 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^

error[E0308]: mismatched types
   --> src/core/request.rs:395:23
    |
395 |           return Some((rh.handler)(self));
    |                  ---- ^^^^^^^^^^^^^^^^^^ expected `Response`, found `Pin<Box<...>>`
    |                  |
    |                  arguments to this enum variant are incorrect
    |
    = note: expected struct `Response`
               found struct `Pin<Box<(dyn Future<Output = Response> + Send + 'static)>>`
help: the type constructed contains `Pin<Box<(dyn Future<Output = Response> + Send + 'static)>>` due to the type of the argument passed
   --> src/core/request.rs:395:18
    |
395 |           return Some((rh.handler)(self));
    |                  ^^^^^------------------^
    |                       |
    |                       this argument influences the type of `Some`
note: tuple variant defined here
   --> /home/f/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:580:5
    |
580 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^

error[E0308]: mismatched types
  --> src/runtime/async/tokio.rs:41:53
   |
41 |       .insert((rt, path.to_string()), Rh { handler: rh });
   |                                                     ^^ expected `Pin<Box<...>>`, found `Response`
   |
   = note: expected fn pointer `for<'a> fn(&'a request::Request) -> Pin<Box<(dyn Future<Output = Response> + Send + 'static)>>`
              found fn pointer `for<'a> fn(&'a request::Request) -> Response`