[][src]Trait lightspeed_auth::repository::AuthAccountRepository

pub trait AuthAccountRepository: Clone + Send + Sync {
    type Conn: SqlConnection;
#[must_use]    fn fetch_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        user_id: i64
    ) -> Pin<Box<dyn Future<Output = Result<AuthAccountModel, LightSpeedError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: '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<AuthAccountModel, LightSpeedError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn fetch_by_username_optional<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        username: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<Option<AuthAccountModel>, LightSpeedError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn fetch_by_email_optional<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        email: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<Option<AuthAccountModel>, 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<AuthAccountData>
    ) -> Pin<Box<dyn Future<Output = Result<AuthAccountModel, LightSpeedError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn update<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        model: Model<AuthAccountData>
    ) -> Pin<Box<dyn Future<Output = Result<AuthAccountModel, 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: AuthAccountModel
    ) -> Pin<Box<dyn Future<Output = Result<AuthAccountModel, 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_id<'life0, 'life1, 'async_trait>(
    &'life0 self,
    conn: &'life1 mut Self::Conn,
    user_id: i64
) -> Pin<Box<dyn Future<Output = Result<AuthAccountModel, LightSpeedError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: '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<AuthAccountModel, LightSpeedError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn fetch_by_username_optional<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    conn: &'life1 mut Self::Conn,
    username: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Option<AuthAccountModel>, LightSpeedError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn fetch_by_email_optional<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    conn: &'life1 mut Self::Conn,
    email: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Option<AuthAccountModel>, 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<AuthAccountData>
) -> Pin<Box<dyn Future<Output = Result<AuthAccountModel, LightSpeedError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn update<'life0, 'life1, 'async_trait>(
    &'life0 self,
    conn: &'life1 mut Self::Conn,
    model: Model<AuthAccountData>
) -> Pin<Box<dyn Future<Output = Result<AuthAccountModel, 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: AuthAccountModel
) -> Pin<Box<dyn Future<Output = Result<AuthAccountModel, LightSpeedError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

impl AuthAccountRepository for PgAuthAccountRepository[src]

type Conn = PgConnection

Loading content...