pub trait AccessTokenProvider:
Sync
+ Send
+ Sized
+ Clone {
// Required method
fn get_access_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SdkResult<AccessToken>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
WxSdk take a struct which impl AccessTokenProvider. You need to use async_trait to implement AccessTokenProvider.
Required Methods§
Sourcefn get_access_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SdkResult<AccessToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_access_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SdkResult<AccessToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
This trait derive async_trait, it return a std::future of AccessToken.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.