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

pub trait TokenRepository: Clone + Send + Sync {
    type Conn: SqlConnection;
#[must_use]    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
;
#[must_use] 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
;
#[must_use] 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
;
#[must_use] 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

type Conn: SqlConnection

Loading content...

Required methods

#[must_use]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, 

#[must_use]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, 

#[must_use]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, 

#[must_use]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, 

Loading content...

Implementors

impl TokenRepository for PgTokenRepository[src]

type Conn = PgConnection

Loading content...