#[non_exhaustive]pub struct ParentOptions {
pub group_by: Option<SnapshotGroupCriterion>,
pub parents: Vec<String>,
pub skip_if_unchanged: 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
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)
parents: Vec<String>Snapshot to use as parent (can be specified multiple times)
skip_if_unchanged: boolSkip writing of snapshot if nothing changed w.r.t. the parent snapshot.
force: boolUse no parent, read all files
ignore_ctime: boolIgnore ctime changes when checking for modified files
ignore_inode: boolIgnore 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 parents(self, value: impl Into<Vec<String>>) -> Self
pub fn parents(self, value: impl Into<Vec<String>>) -> Self
Sets the parents field of this struct.
Sourcepub fn skip_if_unchanged(self, value: impl Into<bool>) -> Self
pub fn skip_if_unchanged(self, value: impl Into<bool>) -> Self
Sets the skip_if_unchanged 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<S: IndexedTree>(
&self,
repo: &Repository<S>,
snap: &SnapshotFile,
backup_stdin: bool,
) -> (Vec<SnapshotId>, Parent)
pub(crate) fn get_parent<S: IndexedTree>( &self, repo: &Repository<S>, snap: &SnapshotFile, backup_stdin: bool, ) -> (Vec<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
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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>,
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>
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>
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
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, 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
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>
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>
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 more