pub trait AuthAccountRepository<Id: IdType>: Clone + Send + Sync {
    type Tx: Send + Sync;

    // Required methods
    fn fetch_all_by_status(
        &self,
        tx: &mut Self::Tx,
        status: AuthAccountStatus,
        start_user_id: &Id,
        limit: u32
    ) -> impl Future<Output = Result<Vec<AuthAccountModel<Id>>, LsError>> + Send;
    fn fetch_by_id(
        &self,
        tx: &mut Self::Tx,
        user_id: &Id
    ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send;
    fn fetch_by_username(
        &self,
        tx: &mut Self::Tx,
        username: &str
    ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send;
    fn fetch_by_username_optional(
        &self,
        tx: &mut Self::Tx,
        username: &str
    ) -> impl Future<Output = Result<Option<AuthAccountModel<Id>>, LsError>> + Send;
    fn fetch_by_email_optional(
        &self,
        tx: &mut Self::Tx,
        email: &str
    ) -> impl Future<Output = Result<Option<AuthAccountModel<Id>>, LsError>> + Send;
    fn save(
        &self,
        tx: &mut Self::Tx,
        model: NewModel<AuthAccountData>
    ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send;
    fn update(
        &self,
        tx: &mut Self::Tx,
        model: Model<Id, AuthAccountData>
    ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send;
    fn delete(
        &self,
        tx: &mut Self::Tx,
        model: AuthAccountModel<Id>
    ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send;
    fn delete_by_id(
        &self,
        tx: &mut Self::Tx,
        user_id: &Id
    ) -> impl Future<Output = Result<u64, LsError>> + Send;
}

Required Associated Types§

Required Methods§

source

fn fetch_all_by_status( &self, tx: &mut Self::Tx, status: AuthAccountStatus, start_user_id: &Id, limit: u32 ) -> impl Future<Output = Result<Vec<AuthAccountModel<Id>>, LsError>> + Send

source

fn fetch_by_id( &self, tx: &mut Self::Tx, user_id: &Id ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send

source

fn fetch_by_username( &self, tx: &mut Self::Tx, username: &str ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send

source

fn fetch_by_username_optional( &self, tx: &mut Self::Tx, username: &str ) -> impl Future<Output = Result<Option<AuthAccountModel<Id>>, LsError>> + Send

source

fn fetch_by_email_optional( &self, tx: &mut Self::Tx, email: &str ) -> impl Future<Output = Result<Option<AuthAccountModel<Id>>, LsError>> + Send

source

fn save( &self, tx: &mut Self::Tx, model: NewModel<AuthAccountData> ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send

source

fn update( &self, tx: &mut Self::Tx, model: Model<Id, AuthAccountData> ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send

source

fn delete( &self, tx: &mut Self::Tx, model: AuthAccountModel<Id> ) -> impl Future<Output = Result<AuthAccountModel<Id>, LsError>> + Send

source

fn delete_by_id( &self, tx: &mut Self::Tx, user_id: &Id ) -> impl Future<Output = Result<u64, LsError>> + Send

Object Safety§

This trait is not object safe.

Implementors§