Skip to main content

AuthUserRepository

Trait AuthUserRepository 

Source
pub trait AuthUserRepository:
    Debug
    + Send
    + Sync {
    // Required methods
    fn insert<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user: &'life1 AuthUser,
    ) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn find_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 AuthUserId,
    ) -> Pin<Box<dyn Future<Output = AppResult<Option<AuthUser>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list<'life0, 'life1, 'async_trait>(
        &'life0 self,
        limit: i64,
        cursor: Option<&'life1 str>,
    ) -> Pin<Box<dyn Future<Output = AppResult<Vec<AuthUser>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn find_session_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = AppResult<Option<AuthSessionRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_sessions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        limit: i64,
        cursor: Option<&'life1 str>,
    ) -> Pin<Box<dyn Future<Output = AppResult<Vec<AuthSessionRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn revoke_session_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        revoked_at: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = AppResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_user_disabled_at<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        user_id: &'life1 AuthUserId,
        disabled_at: Option<DateTime<Utc>>,
        disabled_reason: Option<&'life2 str>,
        disabled_until: Option<DateTime<Utc>>,
    ) -> Pin<Box<dyn Future<Output = AppResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn insert<'life0, 'life1, 'async_trait>( &'life0 self, user: &'life1 AuthUser, ) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn find_by_id<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 AuthUserId, ) -> Pin<Box<dyn Future<Output = AppResult<Option<AuthUser>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list<'life0, 'life1, 'async_trait>( &'life0 self, limit: i64, cursor: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = AppResult<Vec<AuthUser>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn find_session_by_id<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AppResult<Option<AuthSessionRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_sessions<'life0, 'life1, 'async_trait>( &'life0 self, limit: i64, cursor: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = AppResult<Vec<AuthSessionRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn revoke_session_by_id<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, revoked_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = AppResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn set_user_disabled_at<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, user_id: &'life1 AuthUserId, disabled_at: Option<DateTime<Utc>>, disabled_reason: Option<&'life2 str>, disabled_until: Option<DateTime<Utc>>, ) -> Pin<Box<dyn Future<Output = AppResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§