Skip to main content

TokenStore

Trait TokenStore 

Source
pub trait TokenStore: Send + Sync {
    // Required methods
    fn store_token<'life0, 'life1, 'async_trait>(
        &'life0 self,
        provider_id: i64,
        token: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_token<'life0, 'async_trait>(
        &'life0 self,
        provider_id: i64,
    ) -> Pin<Box<dyn Future<Output = DomainResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_token<'life0, 'async_trait>(
        &'life0 self,
        provider_id: i64,
    ) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_all_tokens<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DomainResult<HashMap<i64, String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn get_token_by_name<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = DomainResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn export_encrypted<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _password: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = DomainResult<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn import_encrypted<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _data: &'life1 [u8],
        _password: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn warmup<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn store_token<'life0, 'life1, 'async_trait>( &'life0 self, provider_id: i64, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_token<'life0, 'async_trait>( &'life0 self, provider_id: i64, ) -> Pin<Box<dyn Future<Output = DomainResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete_token<'life0, 'async_trait>( &'life0 self, provider_id: i64, ) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_all_tokens<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DomainResult<HashMap<i64, String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn get_token_by_name<'life0, 'life1, 'async_trait>( &'life0 self, _name: &'life1 str, ) -> Pin<Box<dyn Future<Output = DomainResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn export_encrypted<'life0, 'life1, 'async_trait>( &'life0 self, _password: &'life1 str, ) -> Pin<Box<dyn Future<Output = DomainResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn import_encrypted<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _data: &'life1 [u8], _password: &'life2 str, ) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn warmup<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§