pub struct RestoreOptions {
pub version: Option<String>,
pub if_not_exists: bool,
}Expand description
Options for restore operations.
The condition checks the file currently stored at the restore path. The selected version remains the source of the restore, and the restore may still fail because that version does not exist.
See the conditional operation specification for the complete cross-operation contract.
Fields§
§version: Option<String>Restore this historical version as the current version.
This selects which stored version the restore promotes; it is not a condition on the file at the restore path.
Check crate::Capability::restore_with_version before using this
option.
if_not_exists: boolRestore the selected version only when no file currently exists at the restore path.
The condition succeeds when the restore path is empty. An existing
file fails the restore with crate::ErrorKind::ConditionNotMatch,
which protects recovery workflows from overwriting a file recreated
after the version to restore was selected.
This option requires RestoreOptions::version; setting it without
a version returns crate::ErrorKind::ConfigInvalid. The operation
returns crate::ErrorKind::Unsupported when the service does not
advertise crate::Capability::restore_with_if_not_exists.
Trait Implementations§
Source§impl Clone for RestoreOptions
impl Clone for RestoreOptions
Source§fn clone(&self) -> RestoreOptions
fn clone(&self) -> RestoreOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RestoreOptions
impl Debug for RestoreOptions
Source§impl Default for RestoreOptions
impl Default for RestoreOptions
Source§fn default() -> RestoreOptions
fn default() -> RestoreOptions
impl Eq for RestoreOptions
Source§impl From<RestoreOptions> for OpRestore
impl From<RestoreOptions> for OpRestore
Source§fn from(value: RestoreOptions) -> Self
fn from(value: RestoreOptions) -> Self
Source§impl PartialEq for RestoreOptions
impl PartialEq for RestoreOptions
impl StructuralPartialEq for RestoreOptions
Auto Trait Implementations§
impl Freeze for RestoreOptions
impl RefUnwindSafe for RestoreOptions
impl Send for RestoreOptions
impl Sync for RestoreOptions
impl Unpin for RestoreOptions
impl UnsafeUnpin for RestoreOptions
impl UnwindSafe for RestoreOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.