pub trait TokenInjector:
Sized
+ Send
+ Sync {
// Required method
fn inject_token<'life0, 'async_trait>(
self,
token_provider: &'life0 dyn TokenProvider,
) -> Pin<Box<dyn Future<Output = Result<Self, ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Allows injecting tokens.
Required Methods§
fn inject_token<'life0, 'async_trait>(
self,
token_provider: &'life0 dyn TokenProvider,
) -> Pin<Box<dyn Future<Output = Result<Self, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Implementations on Foreign Types§
Source§impl TokenInjector for RequestBuilder
Injects tokens into a request by setting the authorization header to a “bearer” token.
impl TokenInjector for RequestBuilder
Injects tokens into a request by setting the authorization header to a “bearer” token.