Skip to main content

AuthorizationPolicy

Trait AuthorizationPolicy 

Source
pub trait AuthorizationPolicy: Send + Sync {
    // Required method
    fn authorize(
        &self,
        request: &AuthorizationRequest<'_>,
    ) -> AuthorizationResult;
}
Expand description

A policy that decides whether operations are allowed.

Implementations must be shareable across threads (Send + Sync). The OS layer provides the real policy; the Engine only consults it.

Required Methods§

Source

fn authorize(&self, request: &AuthorizationRequest<'_>) -> AuthorizationResult

Decides whether the request is allowed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§