pub fn default_storage(app_id: &str) -> Arc<dyn CredentialStorage> ⓘExpand description
Resolves the configured CredentialStore for app_id and builds the
matching backend.
Resolution consults (in priority order): the --credential-store CLI flag
stored in a per-thread latch by crate::cli::Cli::run; the
${PREFIX}_CREDENTIAL_STORE env var; the config file; and finally the
default CredentialStore::Keyring.
Note: this function reads thread-local state set by Cli::run. Calling
it outside of a Cli::run execution (e.g. in a standalone binary without a
Cli) always sees None for the flag and relies solely on the env var and
config file. Prefer storage_for with an explicit CredentialStore
when you don’t need the full resolution chain.