Trait UserStore
Source pub trait UserStore: Send + Sync {
// Required methods
fn create_user<'life0, 'async_trait>(
&'life0 self,
user: User,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_user<'life0, 'async_trait>(
&'life0 self,
user_id: UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_user<'life0, 'async_trait>(
&'life0 self,
user: User,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_user<'life0, 'async_trait>(
&'life0 self,
user_id: UserId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_users<'life0, 'async_trait>(
&'life0 self,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<User>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}