Skip to main content

VerificationStore

Trait VerificationStore 

Source
pub trait VerificationStore: Send + Sync {
    // Required methods
    fn create_verification<'life0, 'async_trait>(
        &'life0 self,
        verification: NewVerification,
    ) -> Pin<Box<dyn Future<Output = Result<Verification, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn find_by_identifier<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identifier: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Verification>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn find_by_token_hash<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token_hash: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Verification>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn delete_verification<'life0, 'async_trait>(
        &'life0 self,
        id: i64,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn delete_by_identifier<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identifier: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn delete_expired<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<u64, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Storage backend for verification token records.

Required Methods§

Source

fn create_verification<'life0, 'async_trait>( &'life0 self, verification: NewVerification, ) -> Pin<Box<dyn Future<Output = Result<Verification, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn find_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Verification>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn find_by_token_hash<'life0, 'life1, 'async_trait>( &'life0 self, token_hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Verification>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn delete_verification<'life0, 'async_trait>( &'life0 self, id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn delete_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn delete_expired<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Implementations on Foreign Types§

Source§

impl VerificationStore for AuthDb

Source§

fn create_verification<'life0, 'async_trait>( &'life0 self, verification: NewVerification, ) -> Pin<Box<dyn Future<Output = Result<Verification, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, AuthDb: 'async_trait,

Source§

fn find_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Verification>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, AuthDb: 'async_trait,

Source§

fn find_by_token_hash<'life0, 'life1, 'async_trait>( &'life0 self, token_hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Verification>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, AuthDb: 'async_trait,

Source§

fn delete_verification<'life0, 'async_trait>( &'life0 self, id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, AuthDb: 'async_trait,

Source§

fn delete_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, AuthDb: 'async_trait,

Source§

fn delete_expired<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, AuthDb: 'async_trait,

Implementors§