pub trait ValidateRequest<S, B>:
Send
+ Sync
+ 'static {
type ResponseBody;
// Required method
fn validate(
&self,
ctx: Context<S>,
request: Request<B>,
) -> impl Future<Output = Result<(Context<S>, Request<B>), Response<Self::ResponseBody>>> + Send + '_;
}
Expand description
Trait for validating requests.
Required Associated Types§
Sourcetype ResponseBody
type ResponseBody
The body type used for responses to unvalidated requests.
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.