Trait mas_storage::app_session::AppSessionRepository

source ·
pub trait AppSessionRepository: Send + Sync {
    type Error;

    // Required methods
    fn list<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        filter: AppSessionFilter<'life1>,
        pagination: Pagination,
    ) -> Pin<Box<dyn Future<Output = Result<Page<AppSession>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn count<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        filter: AppSessionFilter<'life1>,
    ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A AppSessionRepository helps interacting with both [CompatSession] and OAuth 2.0 [Session] at the same time saved in the storage backend

Required Associated Types§

source

type Error

The error type returned by the repository

Required Methods§

source

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: AppSessionFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<AppSession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List AppSession with the given filter and pagination

Returns a page of AppSession matching the given filter

§Parameters
  • filter: The filter to apply
  • pagination: The pagination parameters
§Errors

Returns Self::Error if the underlying repository fails

source

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: AppSessionFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the number of AppSession with the given filter

§Parameters
  • filter: The filter to apply
§Errors

Returns Self::Error if the underlying repository fails

Implementations on Foreign Types§

source§

impl<R> AppSessionRepository for Box<R>

§

type Error = <R as AppSessionRepository>::Error

source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: AppSessionFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<AppSession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: AppSessionFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

source§

impl<R, F, E> AppSessionRepository for MapErr<R, F>

§

type Error = E