Trait hyper_simple_server::Handler
source · [−]pub trait Handler where
Self: Send + Sync + 'static, {
type Future: Future<Output = ServerResult<Response<Self::ResponseBody>>> + Send + 'static;
type ResponseBody: BodyTrait<Data = Bytes, Error = Self::ResponseBodyError> + Send + Sync + 'static;
type ResponseBodyError: Error + Send + Sync + 'static;
fn handle(&self, _request: Request<Body>) -> Self::Future;
fn wrap(self) -> HandlerWrapper<Self>
where
Self: Sized,
{ ... }
}