pub struct DefaultKeyringStore { /* private fields */ }Expand description
OS keyring backend (macOS Keychain, Windows Credential Manager,
Linux Secret Service / kwallet). This backend is opt-in through
SECRET_BACKEND_ENV. On platforms without a configured native
keyring dependency, probing this backend returns an unsupported error so
Secrets::auto_detect can 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. Returns
Ok(None) if no entry exists.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.
Source§fn delete(&self, key: &str) -> Result<(), SecretsError>
fn delete(&self, key: &str) -> Result<(), SecretsError>
Remove a secret. Should not error if the entry is absent.
Source§fn backend_name(&self) -> &'static str
fn backend_name(&self) -> &'static str
Short, human-readable name of the backend (used by
doctor).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