Skip to main content

PushChallengeStorage

Trait PushChallengeStorage 

Source
pub trait PushChallengeStorage: Send + Sync {
    // Required methods
    fn save_challenge<'life0, 'life1, 'async_trait>(
        &'life0 self,
        challenge: &'life1 PushChallenge,
    ) -> Pin<Box<dyn Future<Output = Result<(), PushError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_challenge<'life0, 'life1, 'async_trait>(
        &'life0 self,
        challenge_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<PushChallenge>, PushError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_response<'life0, 'life1, 'async_trait>(
        &'life0 self,
        challenge_id: &'life1 str,
        response: PushResponse,
    ) -> Pin<Box<dyn Future<Output = Result<(), PushError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_device_token<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 UserId,
        platform: DevicePlatform,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PushError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Storage trait for push challenges

Required Methods§

Source

fn save_challenge<'life0, 'life1, 'async_trait>( &'life0 self, challenge: &'life1 PushChallenge, ) -> Pin<Box<dyn Future<Output = Result<(), PushError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save challenge

Source

fn get_challenge<'life0, 'life1, 'async_trait>( &'life0 self, challenge_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<PushChallenge>, PushError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get challenge

Source

fn update_response<'life0, 'life1, 'async_trait>( &'life0 self, challenge_id: &'life1 str, response: PushResponse, ) -> Pin<Box<dyn Future<Output = Result<(), PushError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update challenge response

Source

fn get_device_token<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 UserId, platform: DevicePlatform, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PushError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get device token for user

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§