Trait AccessControl

Source
pub trait AccessControl: Send + Sync {
    // Required method
    fn check(
        &self,
        subject: impl Subject,
        access: impl Verb,
        resource: impl Resource,
    ) -> impl Future<Output = bool> + Send + Sync;
}
Expand description

Access Control trait. This follows the zanzibar model, of subject, verb, resource.

Required Methods§

Source

fn check( &self, subject: impl Subject, access: impl Verb, resource: impl Resource, ) -> impl Future<Output = bool> + Send + Sync

Check if a subject has access to a resource.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§