Trait tower_http::validate_request::ValidateRequest
source · pub trait ValidateRequest<B> {
type ResponseBody;
// Required method
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§
sourcetype ResponseBody
type ResponseBody
The body type used for responses to unvalidated requests.
Required Methods§
Implementors§
source§impl<B, F, ResBody> ValidateRequest<B> for Fwhere
F: FnMut(&mut Request<B>) -> Result<(), Response<ResBody>>,
impl<B, F, ResBody> ValidateRequest<B> for Fwhere F: FnMut(&mut Request<B>) -> Result<(), Response<ResBody>>,
type ResponseBody = ResBody
source§impl<B, ResBody> ValidateRequest<B> for Basic<ResBody>where
ResBody: Body + Default,
Available on crate feature auth
only.
impl<B, ResBody> ValidateRequest<B> for Basic<ResBody>where ResBody: Body + Default,
Available on crate feature
auth
only.type ResponseBody = ResBody
source§impl<B, ResBody> ValidateRequest<B> for Bearer<ResBody>where
ResBody: Body + Default,
Available on crate feature auth
only.
impl<B, ResBody> ValidateRequest<B> for Bearer<ResBody>where ResBody: Body + Default,
Available on crate feature
auth
only.