pub trait CredentialProvider: Send + Sync {
// Required method
fn list(&self) -> Vec<(String, CredentialRef)>;
}Expand description
Type-erased credential listing. Stored on crate::app::App as
Option<Arc<dyn CredentialProvider>>.
Required Methods§
Sourcefn list(&self) -> Vec<(String, CredentialRef)>
fn list(&self) -> Vec<(String, CredentialRef)>
Yield owned (name, credential) pairs for every credential
the underlying value knows about.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl CredentialProvider for NoCredentials
impl<T> CredentialProvider for T
Blanket impl wrapping any CredentialBearing + Send + Sync
type. Downstream tools impl CredentialBearing for MyConfig
once and Application::builder().credentials_from(Arc::new(my_config))
just works.