Trait AuthoritySync

Source
pub trait AuthoritySync<C, L>:
    Send
    + Sync
    + 'static {
    // Required method
    fn authorized(&self, ext: &mut Extensions, credentials: &C) -> bool;
}
Expand description

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

Required Methods§

Source

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

Returns true if the credentials are authorized, otherwise false.

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§