uhttp 0.17.0

Simple http server for humans
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::future::Future;

use super::Http2Server;
use super::Http2ServerOptions;
use crate::Request;
use crate::Response;

pub fn create_server<F, Fut>(
  options: Http2ServerOptions,
  handle_func: F,
) -> Http2Server<F, Fut>
where
  F: 'static + Send + Sync + Fn(Request, Response) -> Fut,
  Fut: 'static + Send + Future<Output = crate::Result<()>>,
{
  Http2Server::new(handle_func, options)
}