pub trait Keystore: Send + Sync {
// Required methods
fn save(&self, user: &str, secret: &str) -> Result<()>;
fn load(&self, user: &str) -> Result<Option<String>>;
fn forget(&self, user: &str) -> Result<()>;
}Expand description
Abstract OS-native secret store. Implementations MUST be safe to share across threads (the GUI calls them from both the UI thread and background test threads).
Required Methods§
Sourcefn save(&self, user: &str, secret: &str) -> Result<()>
fn save(&self, user: &str, secret: &str) -> Result<()>
Persist secret under (SERVICE, user). Overwrites any existing
value. Returns an error only on real backend failure (e.g. no
Secret Service daemon on Linux).