Trait Authority

Source
pub trait Authority<C, L>:
    Send
    + Sync
    + 'static {
    // Required method
    fn authorized(
        &self,
        credentials: C,
    ) -> impl Future<Output = Option<Extensions>> + Send + '_;
}
Expand description

The Authority trait is used to determine if a set of Credentials are authorized.

Required Methods§

Source

fn authorized( &self, credentials: C, ) -> impl Future<Output = Option<Extensions>> + Send + '_

Returns true if the credentials are authorized, otherwise false.

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§

Source§

impl<A, C, L> Authority<C, L> for A
where A: AuthoritySync<C, L>, C: Credentials + Send + 'static, L: 'static,