Trait Authorizer

Source
pub trait Authorizer:
    Sync
    + Send
    + 'static {
    type Error: Error + Debug + Send + Sync;

    // Required methods
    fn project_id(&self) -> &str;
    fn authorize<T: Send + Sync>(
        &self,
        request: &mut Request<T>,
        scopes: &[&str],
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
}

Required Associated Types§

Required Methods§

Source

fn project_id(&self) -> &str

Source

fn authorize<T: Send + Sync>( &self, request: &mut Request<T>, scopes: &[&str], ) -> impl Future<Output = Result<(), Self::Error>> + Send

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§