pub trait AccountOps:
Send
+ Sync
+ 'static {
type Account: AuthAccount;
// Required methods
fn create_account<'life0, 'async_trait>(
&'life0 self,
account: CreateAccount,
) -> Pin<Box<dyn Future<Output = Result<Self::Account, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
provider: &'life1 str,
provider_account_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Account>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn get_user_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Account>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn update_account<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
update: UpdateAccount,
) -> Pin<Box<dyn Future<Output = Result<Self::Account, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn delete_account<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Account (OAuth provider linking) persistence operations.