pub trait PasswordResetRepository:
Clone
+ Send
+ Sync
+ 'static {
type Error: Error + Send + Sync + 'static;
// Required methods
fn user_exists(
&self,
email: &str,
) -> impl Future<Output = Result<bool, Self::Error>> + Send;
fn token(
&self,
email: &str,
) -> impl Future<Output = Result<Option<StoredPasswordResetToken>, Self::Error>> + Send;
fn replace_token(
&self,
email: &str,
token: StoredPasswordResetToken,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn delete_token(
&self,
email: &str,
expected_digest: &str,
) -> impl Future<Output = Result<bool, Self::Error>> + Send;
}Required Associated Types§
Required Methods§
fn user_exists( &self, email: &str, ) -> impl Future<Output = Result<bool, Self::Error>> + Send
fn token( &self, email: &str, ) -> impl Future<Output = Result<Option<StoredPasswordResetToken>, Self::Error>> + Send
fn replace_token( &self, email: &str, token: StoredPasswordResetToken, ) -> impl Future<Output = Result<(), Self::Error>> + Send
fn delete_token( &self, email: &str, expected_digest: &str, ) -> impl Future<Output = Result<bool, Self::Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".