Skip to main content

AuthoritySync

Trait AuthoritySync 

pub trait AuthoritySync<C, L>:
    Send
    + Sync
    + 'static {
    // Required method
    fn authorized(&self, ext: &Extensions, credentials: &C) -> bool;
}
Available on crate feature http only.
Expand description

A synchronous version of Authority, to be used for primitive implementations.

Required Methods§

fn authorized(&self, ext: &Extensions, credentials: &C) -> bool

Returns true if the credentials are authorized, otherwise false.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

§

impl<C, L, T, const N: usize> AuthoritySync<C, L> for [T; N]
where C: Credentials + Send + 'static, T: AuthoritySync<C, L>,

§

fn authorized(&self, ext: &Extensions, credentials: &C) -> bool

Implementors§

§

impl<C, L, T> AuthoritySync<C, L> for Vec<T>
where C: Credentials + Send + 'static, T: AuthoritySync<C, L>,

§

impl<T> AuthoritySync<Basic, T> for Basic