[][src]Trait vk_token_manager::token::GetToken

pub trait GetToken {
#[must_use]    fn get_token<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = &Token> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Trait that marks object that it has token. It can be anything like: one token, pool of tokens, so on

Required methods

#[must_use]fn get_token<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = &Token> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Get token.

Using

This example is not tested
// `GetToken` implementor here..
let token = many_tokens.get_token().await;
Loading content...

Implementors

impl GetToken for SimpleToken[src]

Loading content...