pub trait WebServer {
// Required methods
fn start(&self) -> Pin<Box<dyn Future<Output = ()>>>;
fn stop(&self) -> Pin<Box<dyn Future<Output = ()>>>;
}Expand description
A trait for managing the lifecycle of a web server.
Implementors of this trait provide asynchronous methods for starting and stopping web server instances.