usecrate::{Request, Response};/// Trait for validating requests.
pubtraitValidateRequest<B>: Send + Sync + 'static {/// The body type used for responses to unvalidated requests.
typeResponseBody;/// Validate the request.
////// If `Ok(())` is returned then the request is allowed through, otherwise not.
fnvalidate(&self,
request:Request<B>,
)-> impl Future<Output = Result<Request<B>, Response<Self::ResponseBody>>>+Send+'_;}