Trait db_sqlx_postgres::prelude::dev::LibAdminDatabase[][src]

pub trait LibAdminDatabase: Send + Sync {
    fn update_email<'life0, 'life1, 'async_trait>(
        &'life0 self,
        payload: &'life1 UpdateEmailPayload<'_>
    ) -> Pin<Box<dyn Future<Output = Result<(), DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn update_password<'life0, 'life1, 'async_trait>(
        &'life0 self,
        payload: &'life1 Creds
    ) -> Pin<Box<dyn Future<Output = Result<(), DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn email_exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        email: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool, DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_account<'life0, 'life1, 'async_trait>(
        &'life0 self,
        username: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn username_exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        username: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool, DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn update_username<'life0, 'life1, 'async_trait>(
        &'life0 self,
        payload: &'life1 UpdateUsernamePayload<'_>
    ) -> Pin<Box<dyn Future<Output = Result<(), DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn update_secret<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
        secret: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<(), DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn get_secret<'life0, 'life1, 'async_trait>(
        &'life0 self,
        username: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<String, DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn email_login<'life0, 'life1, 'async_trait>(
        &'life0 self,
        email: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Creds, DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn username_login<'life0, 'life1, 'async_trait>(
        &'life0 self,
        username: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Password, DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn email_register<'life0, 'life1, 'async_trait>(
        &'life0 self,
        payload: &'life1 EmailRegisterPayload<'_>
    ) -> Pin<Box<dyn Future<Output = Result<(), DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn username_register<'life0, 'life1, 'async_trait>(
        &'life0 self,
        payload: &'life1 UsernameRegisterPayload<'_>
    ) -> Pin<Box<dyn Future<Output = Result<(), DBError>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

foo

Required methods

Update email of specified user in database

Update password of specified user in database

check if an email exists in the database

delete account from database

check if a username exists in the database

update username in database

update secret in database

update secret in database

login with email as user-identifier

login with username as user-identifier

username and email is available during registration

register with username

Implementations on Foreign Types

Update password of specified user in database

check if an email exists in the database

delete account from database

check if a username exists in the database

update username in database

update secret in database

update secret in database

login with email as user-identifier

login with username as user-identifier

username and email is available during registration

register with username

Implementors