pub trait HttpServer {
// Required method
fn serve<'async_trait>(
router: Router,
config: ServerConfig,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>;
}Expand description
Trait for creating and starting HTTP servers
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.