pub struct FileBackendWithPassphrase {
inner: FileBackend,
passphrase: Zeroizing<String>,
}Expand description
Public file-based keychain backend.
Wraps FileBackend and stores the passphrase as a
[zeroize::Zeroizing] string so it is scrubbed from memory on drop.
Fields§
§inner: FileBackend§passphrase: Zeroizing<String>Implementations§
Trait Implementations§
Source§impl KeychainBackend for FileBackendWithPassphrase
impl KeychainBackend for FileBackendWithPassphrase
Source§fn set(&mut self, profile_id: &str, secret: &Secret) -> Result<(), AppError>
fn set(&mut self, profile_id: &str, secret: &Secret) -> Result<(), AppError>
Persist
secret under profile_id, replacing any existing entry.Source§fn get(&self, profile_id: &str) -> Result<Option<Secret>, AppError>
fn get(&self, profile_id: &str) -> Result<Option<Secret>, AppError>
Retrieve the secret for
profile_id, or None if not present.Auto Trait Implementations§
impl Freeze for FileBackendWithPassphrase
impl RefUnwindSafe for FileBackendWithPassphrase
impl Send for FileBackendWithPassphrase
impl Sync for FileBackendWithPassphrase
impl Unpin for FileBackendWithPassphrase
impl UnsafeUnpin for FileBackendWithPassphrase
impl UnwindSafe for FileBackendWithPassphrase
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.