pub trait HttpServerHandler:
Sync
+ Send
+ 'static {
type Body: Body<Data: Send + Sync, Error: Into<Box<dyn Error + Send + Sync>>> + Send;
// Required method
fn handle_request(
self: Arc<Self>,
source: IpAddr,
request: Request<Incoming>,
) -> impl Future<Output = Response<Self::Body>> + Send;
}
Required Associated Types§
Required Methods§
fn handle_request( self: Arc<Self>, source: IpAddr, request: Request<Incoming>, ) -> impl Future<Output = Response<Self::Body>> + Send
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.