Skip to main content

TokenStore

Trait TokenStore 

Source
pub trait TokenStore: Send + Sync {
    // Required methods
    fn load_by_instance<'life0, 'life1, 'async_trait>(
        &'life0 self,
        instance_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Token>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn save_tokens<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        instance_id: &'life1 str,
        tokens: &'life2 [Token],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn update_token_cas<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        instance_id: &'life1 str,
        token: &'life2 Token,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn claim_token<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        instance_id: &'life1 str,
        token_id: &'life2 str,
        version: u32,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn load_by_instance<'life0, 'life1, 'async_trait>( &'life0 self, instance_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Token>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn save_tokens<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance_id: &'life1 str, tokens: &'life2 [Token], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn update_token_cas<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance_id: &'life1 str, token: &'life2 Token, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn claim_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance_id: &'life1 str, token_id: &'life2 str, version: u32, ) -> Pin<Box<dyn Future<Output = Result<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§