Skip to main content
← rust.krizaka.comkrizaka.com

SecretStore

Trait SecretStore 

Source
pub trait SecretStore: Send + Sync {
    // Required methods
    fn get(&self, key: &str) -> Result<Option<String>, SecretError>;
    fn set(&self, key: &str, value: &str) -> Result<(), SecretError>;
    fn remove(&self, key: &str) -> Result<(), SecretError>;
}
Expand description

Where the secrets are kept. One Keychain service per app (its bundle id), one account per key.

Required Methods§

Source

fn get(&self, key: &str) -> Result<Option<String>, SecretError>

Source

fn set(&self, key: &str, value: &str) -> Result<(), SecretError>

Source

fn remove(&self, key: &str) -> Result<(), SecretError>

Removing a key that is not there is not an error (signing out twice is signing out).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§