Skip to main content

RestoreOptions

Struct RestoreOptions 

Source
pub struct RestoreOptions {
Show 13 fields pub ignore_permission_errors: Option<bool>, pub write_files_atomically: Option<bool>, pub overwrite_files: Option<bool>, pub overwrite_directories: Option<bool>, pub overwrite_symlinks: Option<bool>, pub write_sparse_files: Option<bool>, pub skip_owners: Option<bool>, pub skip_permissions: Option<bool>, pub skip_times: Option<bool>, pub ignore_errors: Option<bool>, pub skip_existing: Option<bool>, pub delete_extra: Option<bool>, pub parallel: Option<u32>,
}
Expand description

Options for kopia restore / kopia snapshot restore. The tri-state booleans map to kopia’s --[no-]flag form: Some(true)--flag, Some(false)--no-flag, None → omit (kopia default). M2 flag sweep (issue #216 gap analysis) added everything below overwrite_files; all of them, plus delete_extra, were previously either absent or dormant (the mover’s RestoreOp::restore_options() dropped them via ..Default::default()).

Fields§

§ignore_permission_errors: Option<bool>

--[no-]ignore-permission-errors (kopia default: true).

§write_files_atomically: Option<bool>

--[no-]write-files-atomically.

§overwrite_files: Option<bool>

--[no-]overwrite-files (kopia default: true).

§overwrite_directories: Option<bool>

--[no-]overwrite-directories (kopia default: true).

§overwrite_symlinks: Option<bool>

--[no-]overwrite-symlinks (kopia default: true).

§write_sparse_files: Option<bool>

--[no-]write-sparse-files (kopia default: false).

§skip_owners: Option<bool>

--[no-]skip-owners (kopia default: false).

§skip_permissions: Option<bool>

--[no-]skip-permissions (kopia default: false).

§skip_times: Option<bool>

--[no-]skip-times (kopia default: false).

§ignore_errors: Option<bool>

--[no-]ignore-errors (kopia default: false).

§skip_existing: Option<bool>

--[no-]skip-existing: skip files/symlinks that already exist in the target (kopia default: false). A genuine kingpin tri-state, not a presence-only flag — widened from a bare bool.

§delete_extra: Option<bool>

--[no-]delete-extra: delete files/directories/symlinks present in the restore path but absent from the snapshot (kopia default: false). Backs Restore.spec.options.enableFileDeletion, which was previously a silent no-op — this struct had no field for it at all.

§parallel: Option<u32>

--parallel: restore parallelism (1 disables).

Trait Implementations§

Source§

impl Clone for RestoreOptions

Source§

fn clone(&self) -> RestoreOptions

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 RestoreOptions

Source§

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

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

impl Default for RestoreOptions

Source§

fn default() -> RestoreOptions

Returns the “default value” for a type. Read more
Source§

impl PartialEq for RestoreOptions

Source§

fn eq(&self, other: &RestoreOptions) -> 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 Eq for RestoreOptions

Source§

impl StructuralPartialEq for RestoreOptions

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more