Skip to main content

UserStore

Trait UserStore 

Source
pub trait UserStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn find_by_username<'life0, 'life1, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<User>, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
        email: &'life2 str,
        name: &'life3 str,
        password: &'life4 str,
        is_superuser: bool,
    ) -> Pin<Box<dyn Future<Output = Result<User, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn delete_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn find_by_email<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _email: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<User>, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn find_by_username<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<User>, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, username: &'life1 str, email: &'life2 str, name: &'life3 str, password: &'life4 str, is_superuser: bool, ) -> Pin<Box<dyn Future<Output = Result<User, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source

fn delete_user<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn find_by_email<'life0, 'life1, 'async_trait>( &'life0 self, _email: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<User>, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§