pub struct FileRecoveryStore { /* private fields */ }Expand description
Filesystem journal for the additive V2 recovery contract.
Implementations§
Source§impl FileRecoveryStore
impl FileRecoveryStore
Sourcepub fn open(root: impl Into<PathBuf>) -> UpdateResult<Self>
pub fn open(root: impl Into<PathBuf>) -> UpdateResult<Self>
Opens or creates a V2 recovery journal root.
Sourcepub fn prepare(&self, receipt: ActivationReceiptV2) -> UpdateResult<()>
pub fn prepare(&self, receipt: ActivationReceiptV2) -> UpdateResult<()>
Writes a new prepared receipt and rejects an existing attempt.
Sourcepub fn mark_activated(
&self,
attempt_id: &str,
at_ms: u64,
) -> UpdateResult<RecoveryResult>
pub fn mark_activated( &self, attempt_id: &str, at_ms: u64, ) -> UpdateResult<RecoveryResult>
Marks a prepared receipt as active and awaiting host health evidence.
Sourcepub fn inspect_recovery(&self) -> UpdateResult<RecoveryDecision>
pub fn inspect_recovery(&self) -> UpdateResult<RecoveryDecision>
Inspects the journal without changing or removing any file.
Sourcepub fn replay(&self, action: RecoveryAction) -> UpdateResult<RecoveryResult>
pub fn replay(&self, action: RecoveryAction) -> UpdateResult<RecoveryResult>
Applies one explicitly authorized and fenced recovery action.
Sourcepub fn clear(&self) -> UpdateResult<()>
pub fn clear(&self) -> UpdateResult<()>
Removes a V2 journal only when the caller explicitly discards it.
Trait Implementations§
Source§impl Clone for FileRecoveryStore
impl Clone for FileRecoveryStore
Auto Trait Implementations§
impl Freeze for FileRecoveryStore
impl RefUnwindSafe for FileRecoveryStore
impl Send for FileRecoveryStore
impl Sync for FileRecoveryStore
impl Unpin for FileRecoveryStore
impl UnsafeUnpin for FileRecoveryStore
impl UnwindSafe for FileRecoveryStore
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