Skip to main content

Credentials

Trait Credentials 

Source
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§

Source

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§

Source§

impl Credentials for AccessToken

Source§

impl Credentials for CliSession

Available on non-WebAssembly only.
Source§

impl Credentials for Federated

Available on non-WebAssembly only.
Source§

impl Credentials for InstanceMetadata

Available on non-WebAssembly only.
Source§

impl Credentials for ServiceAccount

Available on crate feature service-account-wasm or non-WebAssembly only.