Skip to main content

Keychain

Trait Keychain 

Source
pub trait Keychain: Send + Sync {
    // Required methods
    fn read(&self, service: &str, account: &str) -> Result<Option<String>>;
    fn write(&self, service: &str, account: &str, value: &str) -> Result<()>;
    fn delete(&self, service: &str, account: &str) -> Result<()>;
}

Required Methods§

Source

fn read(&self, service: &str, account: &str) -> Result<Option<String>>

Source

fn write(&self, service: &str, account: &str, value: &str) -> Result<()>

Source

fn delete(&self, service: &str, account: &str) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Keychain for StubKeychain

Source§

impl Keychain for SystemKeychain

Available on non-macOS only.