pub trait TokenInjector:
Sized
+ Send
+ Sync {
// Required method
fn inject_token(
self,
token_provider: &dyn TokenProvider,
) -> impl Future<Output = Result<Self, Error>>;
}Expand description
Allows injecting tokens.
Required Methods§
fn inject_token( self, token_provider: &dyn TokenProvider, ) -> impl Future<Output = Result<Self, Error>>
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.