pub struct KeyringStore { /* private fields */ }Expand description
The default KeyStore: the platform-native secure store keyring
selects for the current target (see this module’s own doc). service
and account are the same two strings every keyring consumer already
uses to address one credential — pick values scoped to this
application, e.g. ("com.example.myapp", "macula-identity"), since the
underlying stores are shared OS-wide facilities, not sandboxed to this
crate.
Implementations§
Source§impl KeyringStore
impl KeyringStore
Trait Implementations§
Source§impl KeyStore for KeyringStore
impl KeyStore for KeyringStore
Source§fn save_key(&self, key: &[u8]) -> Result<(), KeyStoreError>
fn save_key(&self, key: &[u8]) -> Result<(), KeyStoreError>
Persist
key, overwriting any value already stored under this
store’s identity.Source§fn load_key(&self) -> Result<Zeroizing<Vec<u8>>, KeyStoreError>
fn load_key(&self) -> Result<Zeroizing<Vec<u8>>, KeyStoreError>
Retrieve a previously-
save_keyd key.
KeyStoreError::NotFound if nothing has been stored yet.Source§fn delete_key(&self) -> Result<(), KeyStoreError>
fn delete_key(&self) -> Result<(), KeyStoreError>
Remove a previously-stored key, if any. Not required before a
save_key (which overwrites), only for
deliberately forgetting an identity.Auto Trait Implementations§
impl !RefUnwindSafe for KeyringStore
impl !UnwindSafe for KeyringStore
impl Freeze for KeyringStore
impl Send for KeyringStore
impl Sync for KeyringStore
impl Unpin for KeyringStore
impl UnsafeUnpin for KeyringStore
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