Skip to main content

SecretStore

Trait SecretStore 

Source
pub trait SecretStore: Send + Sync {
    // Required methods
    fn get(
        &self,
        service: &str,
        account: &str,
    ) -> Result<Option<Secret>, SecretError>;
    fn set(
        &self,
        service: &str,
        account: &str,
        value: &Secret,
    ) -> Result<(), SecretError>;
    fn delete(&self, service: &str, account: &str) -> Result<(), SecretError>;
}
Expand description

Service/account keyed secret storage. Implemented by rightkit-secrets.

Required Methods§

Source

fn get( &self, service: &str, account: &str, ) -> Result<Option<Secret>, SecretError>

Source

fn set( &self, service: &str, account: &str, value: &Secret, ) -> Result<(), SecretError>

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§