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.
A backend reports KeyringError::NoPasswordFound only when it established that nothing is
stored. On iOS a store that could not be read reports KeyringError::Locked instead, so a
caller may treat absence as an invitation to write.
Required Methods§
Sourcefn set_value(&mut self, value: &str) -> Result<()>
fn set_value(&mut self, value: &str) -> Result<()>
Store a value, overwriting any existing one. Never reports absence.
Sourcefn get_value(&self) -> Result<String>
fn get_value(&self) -> Result<String>
Read the stored value, or KeyringError::NoPasswordFound if absent.
Sourcefn delete_value(&mut self) -> Result<()>
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".