pub struct FileStore { /* private fields */ }Expand description
Secrets in one JSON file next to the index. This is the only backend: the records are plaintext on disk, protected by filesystem permissions alone, and it is always selected explicitly (design §7.4).
Implementations§
Trait Implementations§
Source§impl CredentialStore for FileStore
impl CredentialStore for FileStore
fn get( &self, component: &str, key: &str, ) -> Result<Option<SecretRecord>, StoreError>
fn put( &self, component: &str, key: &str, rec: &SecretRecord, ) -> Result<(), StoreError>
fn erase(&self, component: &str, key: &str) -> Result<(), StoreError>
Source§fn list(&self, component: Option<&str>) -> Result<Vec<SecretInfo>, StoreError>
fn list(&self, component: Option<&str>) -> Result<Vec<SecretInfo>, StoreError>
Metadata only, never values.
None lists every component.Source§fn components(&self) -> Result<Vec<String>, StoreError>
fn components(&self) -> Result<Vec<String>, StoreError>
The components holding at least one credential. Read more
Source§fn update(
&self,
component: &str,
key: &str,
mutate: &mut dyn FnMut(&mut SecretRecord),
) -> Result<Option<SecretRecord>, StoreError>
fn update( &self, component: &str, key: &str, mutate: &mut dyn FnMut(&mut SecretRecord), ) -> Result<Option<SecretRecord>, StoreError>
Read, mutate and write one record atomically against other processes. Read more
Auto Trait Implementations§
impl Freeze for FileStore
impl RefUnwindSafe for FileStore
impl Send for FileStore
impl Sync for FileStore
impl Unpin for FileStore
impl UnsafeUnpin for FileStore
impl UnwindSafe for FileStore
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