pub trait ValidateRequest<B> {
    type ResponseBody;

    fn validate(
        &mut self,
        request: &mut Request<B>
    ) -> Result<(), Response<Self::ResponseBody>>; }
Available on crate feature validate-request only.
Expand description

Trait for validating requests.

Required Associated Types§

The body type used for responses to unvalidated requests.

Required Methods§

Validate the request.

If Ok(()) is returned then the request is allowed through, otherwise not.

Implementors§