Skip to main content

PasswordResetRepository

Trait PasswordResetRepository 

Source
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§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn user_exists( &self, email: &str, ) -> impl Future<Output = Result<bool, Self::Error>> + Send

Source

fn token( &self, email: &str, ) -> impl Future<Output = Result<Option<StoredPasswordResetToken>, Self::Error>> + Send

Source

fn replace_token( &self, email: &str, token: StoredPasswordResetToken, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Source

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".

Implementors§