Skip to main content

Keyring

Trait Keyring 

Source
pub trait Keyring {
    // Required methods
    fn set_value(&mut self, value: &str) -> Result<()>;
    fn get_value(&self) -> Result<String>;
    fn delete_value(&mut self) -> Result<()>;
}
Expand description

A single keyring entry, bound to one (application, service, key) triple.

Required Methods§

Source

fn set_value(&mut self, value: &str) -> Result<()>

Store a value, overwriting any existing one.

Source

fn get_value(&self) -> Result<String>

Read the stored value, or KeyringError::NoPasswordFound if absent.

Source

fn delete_value(&mut self) -> Result<()>

Delete the stored value, or KeyringError::NoPasswordFound if absent.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§