pub struct DefaultKeyringStore { /* private fields */ }Expand description
OS-native keyring backend.
Wraps the platform credential store:
- macOS: Keychain (via
securityframework) - Windows: Credential Manager
- Linux: Secret Service (GNOME Keyring / kwallet via dbus), excluding OHOS
This backend is opt-in – set the SECRET_BACKEND_ENV environment
variable to system or keyring to activate it. On platforms without
a configured native keyring dependency, probe
returns an unsupported error so Secrets::auto_detect can transparently
fall back to FileKeyringStore.
Implementations§
Trait Implementations§
Source§impl Clone for DefaultKeyringStore
impl Clone for DefaultKeyringStore
Source§fn clone(&self) -> DefaultKeyringStore
fn clone(&self) -> DefaultKeyringStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DefaultKeyringStore
impl Debug for DefaultKeyringStore
Source§impl Default for DefaultKeyringStore
impl Default for DefaultKeyringStore
Source§impl KeyringStore for DefaultKeyringStore
impl KeyringStore for DefaultKeyringStore
Source§fn get(&self, key: &str) -> Result<Option<String>, SecretsError>
fn get(&self, key: &str) -> Result<Option<String>, SecretsError>
Read a secret by key. Read more
Source§fn set(&self, key: &str, value: &str) -> Result<(), SecretsError>
fn set(&self, key: &str, value: &str) -> Result<(), SecretsError>
Write a secret, replacing any existing value for the same key. Read more
Source§fn backend_name(&self) -> &'static str
fn backend_name(&self) -> &'static str
Short, human-readable label for this backend. Read more
Auto Trait Implementations§
impl Freeze for DefaultKeyringStore
impl RefUnwindSafe for DefaultKeyringStore
impl Send for DefaultKeyringStore
impl Sync for DefaultKeyringStore
impl Unpin for DefaultKeyringStore
impl UnsafeUnpin for DefaultKeyringStore
impl UnwindSafe for DefaultKeyringStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more