Function serve_adaptive_https

Source
pub async fn serve_adaptive_https<S, B>(
    addr: SocketAddr,
    service: S,
    tls_config: Arc<ServerConfig>,
) -> Result<()>
where S: Service<Request<Incoming>, Response = Response<B>> + Clone + Send + 'static, S::Future: Send, S::Error: Into<Box<dyn StdError + Send + Sync>>, B: Body + Send + 'static, B::Data: Send, B::Error: Into<Box<dyn StdError + Send + Sync>>,
Expand description

Serve HTTP and HTTPS on the same port