Trait db_core::LibAdminDatabase [−][src]
pub trait LibAdminDatabase: Send + Sync {
fn update_email<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateEmailPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>>
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 = DBResult<()>> + Send + 'async_trait>>
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 = DBResult<bool>> + Send + 'async_trait>>
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 = DBResult<()>> + Send + 'async_trait>>
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 = DBResult<bool>> + Send + 'async_trait>>
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 = DBResult<()>> + Send + 'async_trait>>
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 = DBResult<()>> + Send + 'async_trait>>
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 = DBResult<String>> + Send + 'async_trait>>
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 = DBResult<Creds>> + Send + 'async_trait>>
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 = DBResult<Password>> + Send + 'async_trait>>
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 = DBResult<()>> + Send + 'async_trait>>
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 = DBResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
Expand description
foo
Required methods
fn update_email<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateEmailPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn update_email<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateEmailPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
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
fn update_username<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateUsernamePayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> 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 = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
update username in database
update secret in database
update secret in database
login with email as user-identifier
login with username as user-identifier
fn email_register<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 EmailRegisterPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> 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 = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
username and email is available during registration
fn username_register<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UsernameRegisterPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> 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 = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
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
fn update_username<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateUsernamePayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> 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 = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
update username in database
update secret in database
update secret in database
login with email as user-identifier
login with username as user-identifier
fn email_register<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 EmailRegisterPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> 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 = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
username and email is available during registration
fn username_register<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UsernameRegisterPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> 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 = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
register with username