AuthCheckPredicate

Trait AuthCheckPredicate 

Source
pub trait AuthCheckPredicate {
    type CheckInfo: Clone + Send + Sync + 'static;

    // Required method
    fn check(
        &self,
        username: impl Into<String> + Send,
        password: impl Into<String> + Send,
    ) -> impl Future<Output = Result<Self::CheckInfo>> + Send;

    // Provided methods
    fn username(&self) -> &str { ... }
    fn password(&self) -> &str { ... }
}

Required Associated Types§

Source

type CheckInfo: Clone + Send + Sync + 'static

Required Methods§

Source

fn check( &self, username: impl Into<String> + Send, password: impl Into<String> + Send, ) -> impl Future<Output = Result<Self::CheckInfo>> + Send

Provided Methods§

Source

fn username(&self) -> &str

Source

fn password(&self) -> &str

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.

Implementations on Foreign Types§

Source§

impl<T> AuthCheckPredicate for Arc<T>

Source§

type CheckInfo = <T as AuthCheckPredicate>::CheckInfo

Source§

fn check( &self, username: impl Into<String> + Send, password: impl Into<String> + Send, ) -> impl Future<Output = Result<Self::CheckInfo>> + Send

Implementors§