pub trait Credentials:
Send
+ Sync
+ Debug {
// Required method
fn token(&self) -> TokenFuture<'_>;
}Expand description
Credentials supply the access token each call is sent with. Send + Sync on every target, so a client can live in a UI framework’s
reactive state (Leptos 0.8 keeps memo values Send + Sync even in a
browser); only the future token returns is !Send there.
Required Methods§
Sourcefn token(&self) -> TokenFuture<'_>
fn token(&self) -> TokenFuture<'_>
A valid access token.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Credentials for AccessToken
impl Credentials for CliSession
Available on non-WebAssembly only.
impl Credentials for Federated
Available on non-WebAssembly only.
impl Credentials for InstanceMetadata
Available on non-WebAssembly only.
impl Credentials for ServiceAccount
Available on crate feature
service-account-wasm or non-WebAssembly only.