pub trait AuthCheckPredicate {
type CheckInfo: Clone + Send + Sync + 'static;
// Required methods
fn check<'life0, 'async_trait>(
&'life0 self,
username: impl 'async_trait + Into<String> + Send,
password: impl 'async_trait + Into<String> + Send,
) -> Pin<Box<dyn Future<Output = Result<Self::CheckInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn username(&self) -> &str;
fn password(&self) -> &str;
}Required Associated Types§
Required Methods§
fn check<'life0, 'async_trait>(
&'life0 self,
username: impl 'async_trait + Into<String> + Send,
password: impl 'async_trait + Into<String> + Send,
) -> Pin<Box<dyn Future<Output = Result<Self::CheckInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn username(&self) -> &str
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.