tokio_listener::axum07

Function serve

Source
pub fn serve<M, S>(tokio_listener: Listener, make_service: M) -> Serve<M, S>
where M: for<'a> Service<IncomingStream<'a>, Error = Infallible, Response = S>, S: Service<Request, Response = Response, Error = Infallible> + Clone + Send + 'static, S::Future: Send,
Expand description

Serve the service with the supplied tokio_listener-based listener.

See axum07::serve::serve for more documentation.

See the following examples in tokio_listener project: