Trait lightspeed_auth::repository::TokenRepository[][src]

pub trait TokenRepository: Clone + Send + Sync {
    type Conn: SqlConnection;
    fn fetch_by_token<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        token_string: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<TokenModel, LightSpeedError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn fetch_by_username<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        username: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TokenModel>, LightSpeedError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn save<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        model: NewModel<TokenData>
    ) -> Pin<Box<dyn Future<Output = Result<TokenModel, LightSpeedError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        model: TokenModel
    ) -> Pin<Box<dyn Future<Output = Result<TokenModel, LightSpeedError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Associated Types

Required methods

Implementors