pub struct DefaultBundleStore { /* private fields */ }Expand description
The production BundleStore: adapts the free-function keychain-with-
file-fallback behavior above into a single implementation, so init’s
core logic can be written against one BundleStore regardless of
which concrete backend a given call ends up using. Tracks the
description of whichever backend last succeeded, for describe.
Implementations§
Trait Implementations§
Source§impl BundleStore for DefaultBundleStore
impl BundleStore for DefaultBundleStore
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 DefaultBundleStore
impl !RefUnwindSafe for DefaultBundleStore
impl !Sync for DefaultBundleStore
impl Send for DefaultBundleStore
impl Unpin for DefaultBundleStore
impl UnsafeUnpin for DefaultBundleStore
impl UnwindSafe for DefaultBundleStore
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