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;
    fn finish_sessions_to_replace_device<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        clock: &'life1 dyn Clock,
        user: &'life2 User,
        device: &'life3 Device,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: '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§
Required Methods§
Sourcefn 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 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
Sourcefn 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,
 
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
Sourcefn finish_sessions_to_replace_device<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 mut self,
    clock: &'life1 dyn Clock,
    user: &'life2 User,
    device: &'life3 Device,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
 
fn finish_sessions_to_replace_device<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 mut self,
    clock: &'life1 dyn Clock,
    user: &'life2 User,
    device: &'life3 Device,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
Finishes any application sessions that are using the specified device’s ID.
This is intended for logging in using an existing device ID (i.e. replacing a device).
Should be called before creating a new session for the device.