#[non_exhaustive]pub struct ParentOptions {
pub group_by: Option<SnapshotGroupCriterion>,
pub parent: Option<String>,
pub skip_identical_parent: bool,
pub force: bool,
pub ignore_ctime: bool,
pub ignore_inode: bool,
}
Expand description
backup
subcommand
Options how the backup command uses a parent snapshot.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.group_by: Option<SnapshotGroupCriterion>
Group snapshots by any combination of host,label,paths,tags to find a suitable parent (default: host,label,paths)
parent: Option<String>
Snapshot to use as parent
skip_identical_parent: bool
Skip writing of snapshot if nothing changed w.r.t. the parent snapshot.
force: bool
Use no parent, read all files
ignore_ctime: bool
Ignore ctime changes when checking for modified files
ignore_inode: bool
Ignore inode number changes when checking for modified files
Implementations§
Source§impl ParentOptions
impl ParentOptions
Sourcepub fn group_by(self, value: impl Into<Option<SnapshotGroupCriterion>>) -> Self
pub fn group_by(self, value: impl Into<Option<SnapshotGroupCriterion>>) -> Self
Sets the group_by
field of this struct.
Sourcepub fn parent(self, value: impl Into<Option<String>>) -> Self
pub fn parent(self, value: impl Into<Option<String>>) -> Self
Sets the parent
field of this struct.
Sourcepub fn skip_identical_parent(self, value: impl Into<bool>) -> Self
pub fn skip_identical_parent(self, value: impl Into<bool>) -> Self
Sets the skip_identical_parent
field of this struct.
Sourcepub fn ignore_ctime(self, value: impl Into<bool>) -> Self
pub fn ignore_ctime(self, value: impl Into<bool>) -> Self
Sets the ignore_ctime
field of this struct.
Sourcepub fn ignore_inode(self, value: impl Into<bool>) -> Self
pub fn ignore_inode(self, value: impl Into<bool>) -> Self
Sets the ignore_inode
field of this struct.
Source§impl ParentOptions
impl ParentOptions
Sourcepub(crate) fn get_parent<P: ProgressBars, S: IndexedTree>(
&self,
repo: &Repository<P, S>,
snap: &SnapshotFile,
backup_stdin: bool,
) -> (Option<SnapshotId>, Parent)
pub(crate) fn get_parent<P: ProgressBars, S: IndexedTree>( &self, repo: &Repository<P, S>, snap: &SnapshotFile, backup_stdin: bool, ) -> (Option<SnapshotId>, Parent)
Get parent snapshot.
§Type Parameters
P
- The type of the progress bars.S
- The type of the indexed tree.
§Arguments
repo
- The repository to usesnap
- The snapshot to usebackup_stdin
- Whether the backup is from stdin
§Returns
The parent snapshot id and the parent object or None
if no parent is used.
Trait Implementations§
Source§impl Args for ParentOptions
impl Args for ParentOptions
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl Clone for ParentOptions
impl Clone for ParentOptions
Source§fn clone(&self) -> ParentOptions
fn clone(&self) -> ParentOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl CommandFactory for ParentOptions
impl CommandFactory for ParentOptions
Source§impl Debug for ParentOptions
impl Debug for ParentOptions
Source§impl Default for ParentOptions
impl Default for ParentOptions
Source§fn default() -> ParentOptions
fn default() -> ParentOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ParentOptionswhere
ParentOptions: Default,
impl<'de> Deserialize<'de> for ParentOptionswhere
ParentOptions: Default,
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 FromArgMatches for ParentOptions
impl FromArgMatches for ParentOptions
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§impl Merge for ParentOptions
impl Merge for ParentOptions
Source§impl Parser for ParentOptions
impl Parser for ParentOptions
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for ParentOptions
impl RefUnwindSafe for ParentOptions
impl Send for ParentOptions
impl Sync for ParentOptions
impl Unpin for ParentOptions
impl UnwindSafe for ParentOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MergeFrom for Twhere
T: Merge,
impl<T> MergeFrom for Twhere
T: Merge,
Source§fn merge_from(self, other: Self) -> Selfwhere
Self: Sized,
fn merge_from(self, other: Self) -> Selfwhere
Self: Sized,
Merges two instances of a type into a new instance. Read more