pub struct EncryptedStore { /* private fields */ }Expand description
Encrypted configuration store
Implementations§
Source§impl EncryptedStore
impl EncryptedStore
Sourcepub fn with_secrets(
config_path: impl AsRef<Path>,
secrets: SecretManager,
) -> Result<Self>
pub fn with_secrets( config_path: impl AsRef<Path>, secrets: SecretManager, ) -> Result<Self>
Create a new encrypted store with a specific secret manager
§Arguments
config_path- Path to the encrypted config filesecrets- Secret manager to use
Sourcepub fn load(&self) -> Result<Option<String>>
pub fn load(&self) -> Result<Option<String>>
Load and decrypt configuration
§Returns
Ok(Some(config))if the config exists and was decrypted successfullyOk(None)if the config file doesn’t existErrif there was an error reading or decrypting
Sourcepub fn config_path(&self) -> &Path
pub fn config_path(&self) -> &Path
Get the config file path
Auto Trait Implementations§
impl Freeze for EncryptedStore
impl RefUnwindSafe for EncryptedStore
impl Send for EncryptedStore
impl Sync for EncryptedStore
impl Unpin for EncryptedStore
impl UnsafeUnpin for EncryptedStore
impl UnwindSafe for EncryptedStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more