pub struct FileBundleStore { /* private fields */ }Expand description
Stores the bundle as JSON in a file with 0600 permissions (best-effort
on platforms without POSIX permission bits) — the fallback when the OS
keychain is genuinely unreachable.
Implementations§
Trait Implementations§
Source§impl BundleStore for FileBundleStore
impl BundleStore for FileBundleStore
Source§fn read(&self) -> Result<Option<CredentialBundle>>
fn read(&self) -> Result<Option<CredentialBundle>>
Read the stored bundle, or
None if nothing is stored yet.Source§fn write(&self, bundle: &CredentialBundle) -> Result<()>
fn write(&self, bundle: &CredentialBundle) -> Result<()>
Unconditionally persist
bundle, overwriting any existing one. Used
for explicit rotation and for a repair that merges in new credential
material — both read first, then write, deliberately never trying to
collapse that into one call (ADR-0015).Source§fn create(&self, bundle: &CredentialBundle) -> Result<BundleCreateOutcome>
fn create(&self, bundle: &CredentialBundle) -> Result<BundleCreateOutcome>
Write
bundle only if nothing is stored yet. Returns
BundleCreateOutcome::AlreadyExists, leaving the existing bundle
untouched, if one is already present — never overwrites.Auto Trait Implementations§
impl Freeze for FileBundleStore
impl RefUnwindSafe for FileBundleStore
impl Send for FileBundleStore
impl Sync for FileBundleStore
impl Unpin for FileBundleStore
impl UnsafeUnpin for FileBundleStore
impl UnwindSafe for FileBundleStore
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