pub struct BackupExecutionJournal {
pub journal_version: u16,
pub plan_id: String,
pub run_id: String,
pub preflight_id: Option<String>,
pub preflight_accepted: bool,
pub restart_required: bool,
pub operations: Vec<BackupExecutionJournalOperation>,
pub operation_receipts: Vec<BackupExecutionOperationReceipt>,
}Expand description
BackupExecutionJournal
Fields§
§journal_version: u16§plan_id: String§run_id: String§preflight_id: Option<String>§preflight_accepted: bool§restart_required: bool§operations: Vec<BackupExecutionJournalOperation>§operation_receipts: Vec<BackupExecutionOperationReceipt>Implementations§
Source§impl BackupExecutionJournal
impl BackupExecutionJournal
Sourcepub fn from_plan(plan: &BackupPlan) -> Result<Self, BackupExecutionJournalError>
pub fn from_plan(plan: &BackupPlan) -> Result<Self, BackupExecutionJournalError>
Build an execution journal from a validated backup plan.
Sourcepub fn validate(&self) -> Result<(), BackupExecutionJournalError>
pub fn validate(&self) -> Result<(), BackupExecutionJournalError>
Validate journal structure and operation receipts.
Sourcepub fn accept_preflight_bundle_at(
&mut self,
preflight_id: String,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn accept_preflight_bundle_at( &mut self, preflight_id: String, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Mark all preflight operations completed and unblock mutating operations.
Sourcepub fn accept_preflight_receipts_at(
&mut self,
receipts: &BackupExecutionPreflightReceipts,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn accept_preflight_receipts_at( &mut self, receipts: &BackupExecutionPreflightReceipts, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Accept a typed preflight receipt bundle and unblock mutating operations.
Sourcepub fn next_ready_operation(&self) -> Option<&BackupExecutionJournalOperation>
pub fn next_ready_operation(&self) -> Option<&BackupExecutionJournalOperation>
Return the next operation that should control runner progress.
Sourcepub fn mark_next_operation_pending_at(
&mut self,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn mark_next_operation_pending_at( &mut self, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Mark the next transitionable operation pending.
Sourcepub fn mark_operation_pending_at(
&mut self,
sequence: usize,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn mark_operation_pending_at( &mut self, sequence: usize, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Mark one operation pending.
Sourcepub fn record_operation_receipt(
&mut self,
receipt: BackupExecutionOperationReceipt,
) -> Result<(), BackupExecutionJournalError>
pub fn record_operation_receipt( &mut self, receipt: BackupExecutionOperationReceipt, ) -> Result<(), BackupExecutionJournalError>
Record one operation receipt and transition the matching operation.
Sourcepub fn retry_failed_operation_at(
&mut self,
sequence: usize,
updated_at: Option<String>,
) -> Result<(), BackupExecutionJournalError>
pub fn retry_failed_operation_at( &mut self, sequence: usize, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>
Move a failed operation back to ready for retry.
Sourcepub fn resume_summary(&self) -> BackupExecutionResumeSummary
pub fn resume_summary(&self) -> BackupExecutionResumeSummary
Build a compact resumability summary.
Trait Implementations§
Source§impl Clone for BackupExecutionJournal
impl Clone for BackupExecutionJournal
Source§fn clone(&self) -> BackupExecutionJournal
fn clone(&self) -> BackupExecutionJournal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackupExecutionJournal
impl Debug for BackupExecutionJournal
Source§impl<'de> Deserialize<'de> for BackupExecutionJournal
impl<'de> Deserialize<'de> for BackupExecutionJournal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BackupExecutionJournal
impl PartialEq for BackupExecutionJournal
Source§fn eq(&self, other: &BackupExecutionJournal) -> bool
fn eq(&self, other: &BackupExecutionJournal) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BackupExecutionJournal
impl Serialize for BackupExecutionJournal
impl Eq for BackupExecutionJournal
impl StructuralPartialEq for BackupExecutionJournal
Auto Trait Implementations§
impl Freeze for BackupExecutionJournal
impl RefUnwindSafe for BackupExecutionJournal
impl Send for BackupExecutionJournal
impl Sync for BackupExecutionJournal
impl Unpin for BackupExecutionJournal
impl UnsafeUnpin for BackupExecutionJournal
impl UnwindSafe for BackupExecutionJournal
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