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:
clap_axum07.rs
for simple exampleclap_axum07_advanced.rs
for using incoming connection info and graceful shutdown.