Skip to main content

RestoreApplyJournal

Struct RestoreApplyJournal 

Source
pub struct RestoreApplyJournal {
    pub journal_version: u16,
    pub backup_id: String,
    pub ready: bool,
    pub blocked_reasons: Vec<String>,
    pub operation_count: usize,
    pub pending_operations: usize,
    pub ready_operations: usize,
    pub blocked_operations: usize,
    pub completed_operations: usize,
    pub failed_operations: usize,
    pub operations: Vec<RestoreApplyJournalOperation>,
}
Expand description

RestoreApplyJournal

Fields§

§journal_version: u16§backup_id: String§ready: bool§blocked_reasons: Vec<String>§operation_count: usize§pending_operations: usize§ready_operations: usize§blocked_operations: usize§completed_operations: usize§failed_operations: usize§operations: Vec<RestoreApplyJournalOperation>

Implementations§

Source§

impl RestoreApplyJournal

Source

pub fn from_dry_run(dry_run: &RestoreApplyDryRun) -> Self

Build the initial no-mutation restore apply journal from a dry-run.

Source

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

Validate the structural consistency of a restore apply journal.

Source

pub fn status(&self) -> RestoreApplyJournalStatus

Summarize this apply journal for operators and automation.

Source

pub fn report(&self) -> RestoreApplyJournalReport

Build an operator-oriented report from this apply journal.

Source

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

Return the full next ready operation row, if one is available.

Source

pub fn next_transition_operation(&self) -> Option<&RestoreApplyJournalOperation>

Return the next ready or pending operation that controls runner progress.

Source

pub fn next_operation(&self) -> RestoreApplyNextOperation

Render the next transitionable operation as a compact runner response.

Source

pub fn next_command_preview(&self) -> RestoreApplyCommandPreview

Render the next transitionable operation as a no-execute command preview.

Source

pub fn next_command_preview_with_config( &self, config: &RestoreApplyCommandConfig, ) -> RestoreApplyCommandPreview

Render the next transitionable operation with a configured command preview.

Source

pub fn mark_next_operation_pending( &mut self, ) -> Result<(), RestoreApplyJournalError>

Mark the next transitionable operation pending and refresh journal counts.

Source

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

Mark the next transitionable operation pending with an update marker.

Source

pub fn mark_operation_pending( &mut self, sequence: usize, ) -> Result<(), RestoreApplyJournalError>

Mark one restore apply operation pending and refresh journal counts.

Source

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

Mark one restore apply operation pending with an update marker.

Source

pub fn mark_next_operation_ready( &mut self, ) -> Result<(), RestoreApplyJournalError>

Mark the current pending operation ready again and refresh counts.

Source

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

Mark the current pending operation ready again with an update marker.

Source

pub fn mark_operation_ready( &mut self, sequence: usize, ) -> Result<(), RestoreApplyJournalError>

Mark one restore apply operation ready again and refresh journal counts.

Source

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

Mark one restore apply operation ready again with an update marker.

Source

pub fn mark_operation_completed( &mut self, sequence: usize, ) -> Result<(), RestoreApplyJournalError>

Mark one restore apply operation completed and refresh journal counts.

Source

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

Mark one restore apply operation completed with an update marker.

Source

pub fn mark_operation_failed( &mut self, sequence: usize, reason: String, ) -> Result<(), RestoreApplyJournalError>

Mark one restore apply operation failed and refresh journal counts.

Source

pub fn mark_operation_failed_at( &mut self, sequence: usize, reason: String, updated_at: Option<String>, ) -> Result<(), RestoreApplyJournalError>

Mark one restore apply operation failed with an update marker.

Trait Implementations§

Source§

impl Clone for RestoreApplyJournal

Source§

fn clone(&self) -> RestoreApplyJournal

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RestoreApplyJournal

Source§

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

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

impl<'de> Deserialize<'de> for RestoreApplyJournal

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 RestoreApplyJournal

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 RestoreApplyJournal

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 RestoreApplyJournal

Source§

impl StructuralPartialEq for RestoreApplyJournal

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>,