pub trait TokenType: Send + Sync {
// Required methods
fn token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn app_config(&self) -> AppConfig;
}Expand description
定义接口调用凭据的行为
Required Methods§
Sourcefn token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取接口调用凭据
Sourcefn app_config(&self) -> AppConfig
fn app_config(&self) -> AppConfig
获取应用配置
Implementors§
impl TokenType for NonStableToken
普通接口调用凭据获取实现
impl TokenType for StableToken
稳定版接口调用凭据获取实现