pub trait AuthRepository: Send + Sync {
// Required methods
fn validate_token(
&self,
token: &str,
) -> impl Future<Output = Result<Claims, AuthError>> + Send;
fn identify(
&self,
token: &str,
) -> impl Future<Output = Result<Identity, AuthError>> + Send;
}Required Methods§
fn validate_token( &self, token: &str, ) -> impl Future<Output = Result<Claims, AuthError>> + Send
fn identify( &self, token: &str, ) -> impl Future<Output = Result<Identity, AuthError>> + 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.