cedar_policy_core::ast

Trait RequestSchema

Source
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 Requests

Required Associated Types§

Source

type Error: Diagnostic

Error type returned when a request fails validation

Required Methods§

Source

fn validate_request( &self, request: &Request, extensions: &Extensions<'_>, ) -> Result<(), Self::Error>

Validate the given request, returning Err if it fails validation

Implementors§