Skip to main content

BackupExecutionJournal

Struct BackupExecutionJournal 

Source
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

Source

pub fn from_plan(plan: &BackupPlan) -> Result<Self, BackupExecutionJournalError>

Build an execution journal from a validated backup plan.

Source

pub fn validate(&self) -> Result<(), BackupExecutionJournalError>

Validate journal structure and operation receipts.

Source

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.

Source

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.

Source

pub fn next_ready_operation(&self) -> Option<&BackupExecutionJournalOperation>

Return the next operation that should control runner progress.

Source

pub fn mark_next_operation_pending_at( &mut self, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>

Mark the next transitionable operation pending.

Source

pub fn mark_operation_pending_at( &mut self, sequence: usize, updated_at: Option<String>, ) -> Result<(), BackupExecutionJournalError>

Mark one operation pending.

Source

pub fn record_operation_receipt( &mut self, receipt: BackupExecutionOperationReceipt, ) -> Result<(), BackupExecutionJournalError>

Record one operation receipt and transition the matching operation.

Source

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.

Source

pub fn resume_summary(&self) -> BackupExecutionResumeSummary

Build a compact resumability summary.

Trait Implementations§

Source§

impl Clone for BackupExecutionJournal

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for BackupExecutionJournal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BackupExecutionJournal

Source§

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

Source§

fn eq(&self, other: &BackupExecutionJournal) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for BackupExecutionJournal

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for BackupExecutionJournal

Source§

impl StructuralPartialEq for BackupExecutionJournal

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,