Trait encrypt_config::source::SecretSource

source ·
pub trait SecretSource: Source + Serialize + DeserializeOwned {
    const PATH: &'static str;
    const KEYRING_ENTRY: &'static str;

    // Provided methods
    fn path() -> PathBuf { ... }
    fn load() -> ConfigResult<Self> { ... }
    fn save(&self) -> ConfigResult<()> { ... }
}
Available on crate feature secret only.
Expand description

Secret source trait.

Required Associated Constants§

source

const PATH: &'static str

Available on non-crate feature default_config_dir only.

Path for the persist source.

source

const KEYRING_ENTRY: &'static str

Keyring entry for the secret source.

Provided Methods§

source

fn path() -> PathBuf

Path for the persist source.

source

fn load() -> ConfigResult<Self>

Load the secret source.

source

fn save(&self) -> ConfigResult<()>

Save the secret source.

Object Safety§

This trait is not object safe.

Implementors§