Trait walker_common::sender::provider::TokenProvider

source ·
pub trait TokenProvider: Send + Sync {
    // Required method
    fn provide_access_token<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Credentials>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A provider for access credentials (mostly access tokens).

Required Methods§

source

fn provide_access_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Credentials>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

source§

impl TokenProvider for ()

source§

fn provide_access_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Credentials>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

impl TokenProvider for String

source§

fn provide_access_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Credentials>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

impl TokenProvider for Arc<dyn TokenProvider>

source§

fn provide_access_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Credentials>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

impl<T> TokenProvider for &Arc<T>
where T: TokenProvider,

source§

fn provide_access_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Credentials>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

impl<T> TokenProvider for Option<T>
where T: TokenProvider + Sync,

source§

fn provide_access_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Credentials>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

impl<T> TokenProvider for Arc<T>
where T: TokenProvider,

source§

fn provide_access_token<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Credentials>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§