pub trait RequestSchema {
type Error: Diagnostic;
// Required method
fn validate_request(
&self,
request: &Request,
extensions: &Extensions<'_>,
) -> Result<(), Self::Error>;
}
Expand description
Trait for schemas capable of validating Request
s
Required Associated Types§
Sourcetype Error: Diagnostic
type Error: Diagnostic
Error type returned when a request fails validation
Required Methods§
Sourcefn validate_request(
&self,
request: &Request,
extensions: &Extensions<'_>,
) -> Result<(), Self::Error>
fn validate_request( &self, request: &Request, extensions: &Extensions<'_>, ) -> Result<(), Self::Error>
Validate the given request
, returning Err
if it fails validation