Trait SecretBackend
pub trait SecretBackend: Send + Sync {
// Required methods
fn protection(&self) -> Protection;
fn get(&self, app: &str, key: &str) -> Result<Option<Secret>, SecretError>;
fn put(
&self,
app: &str,
key: &str,
value: &[u8],
label: &str,
) -> Result<(), SecretError>;
fn delete(&self, app: &str, key: &str) -> Result<(), SecretError>;
// Provided method
fn probe(&self) -> Result<(), SecretError> { ... }
}Expand description
A synchronous secret store for one process: the desktop backends,
SecretStore::memory, or a host’s own. Every call names the app.
Required Methods§
fn protection(&self) -> Protection
fn get(&self, app: &str, key: &str) -> Result<Option<Secret>, SecretError>
fn get(&self, app: &str, key: &str) -> Result<Option<Secret>, SecretError>
§Errors
The store is unavailable or refused.
Provided Methods§
fn probe(&self) -> Result<(), SecretError>
fn probe(&self) -> Result<(), SecretError>
Whether the store answers at all on this session, without touching a secret.
§Errors
Why it does not.