pub trait CredentialStore: Send + Sync {
// Required methods
fn get(&self, provider: &str) -> Option<String>;
fn set(&self, provider: &str, key: &str) -> Result<()>;
fn delete(&self, provider: &str) -> Result<bool>;
fn label(&self) -> &'static str;
}Expand description
Abstract credential storage so resolution logic tests against an in-memory fake instead of the real OS keyring.
Required Methods§
Sourcefn get(&self, provider: &str) -> Option<String>
fn get(&self, provider: &str) -> Option<String>
The stored key for provider, if any. Backend failures (no Secret
Service, locked keychain) read as None — resolution then simply
reports no key, exactly like an unset env var.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".