pub async fn serve( listener: TcpListener, app: Router, shutdown: impl Future<Output = ()> + Send, ) -> Result<()>
用默认超时在 listener 上提供服务,shutdown 完成后优雅退出。
listener
shutdown