pub(crate) struct RewriteCmd {
pub ids: Vec<String>,
pub forget: bool,
pub tags_rewritten: Option<StringList>,
pub modification: SnapshotModification,
pub all_trees: bool,
pub excludes: Excludes,
pub node_modification: NodeModification,
}Expand description
rewrite subcommand
Fields§
§ids: Vec<String>Snapshots to rewrite. If none is given, use filter to filter from all snapshots.
Snapshot can be identified the following ways: “01a2b3c4” or “latest” or “latest~N” (N >= 0)
forget: boolremove original snapshots
Tags to add to rewritten snapshots [default: “rewrite” if original snapshots are not removed]
modification: SnapshotModification§all_trees: booltreat all trees as changed (i.e. serialize all and rebuild summary)
excludes: Excludes§node_modification: NodeModificationImplementations§
Source§impl RewriteCmd
impl RewriteCmd
fn opts(&self) -> RewriteOptions
fn inner_run_open(&self, repo: Repository<OpenStatus>) -> Result<()>
fn inner_run_indexed(&self, repo: Repository<IndexedFullStatus>) -> Result<()>
fn output(&self, snaps: Vec<SnapshotFile>)
Trait Implementations§
Source§impl Args for RewriteCmd
impl Args for RewriteCmd
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 Command for RewriteCmd
impl Command for RewriteCmd
Source§fn description() -> &'static str
fn description() -> &'static str
Description of this program
Authors of this program
Source§fn parse_args<T, I>(into_args: I) -> Self
fn parse_args<T, I>(into_args: I) -> Self
Parse command-line arguments from an iterator
Source§fn parse_env_args() -> Selfwhere
Self: Parser,
fn parse_env_args() -> Selfwhere
Self: Parser,
Parse command-line arguments from the environment
Source§impl CommandFactory for RewriteCmd
impl CommandFactory for RewriteCmd
Source§impl Debug for RewriteCmd
impl Debug for RewriteCmd
Source§impl Default for RewriteCmd
impl Default for RewriteCmd
Source§fn default() -> RewriteCmd
fn default() -> RewriteCmd
Returns the “default value” for a type. Read more
Source§impl FromArgMatches for RewriteCmd
impl FromArgMatches for RewriteCmd
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 Parser for RewriteCmd
impl Parser for RewriteCmd
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 RewriteCmd
impl RefUnwindSafe for RewriteCmd
impl Send for RewriteCmd
impl Sync for RewriteCmd
impl Unpin for RewriteCmd
impl UnsafeUnpin for RewriteCmd
impl UnwindSafe for RewriteCmd
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more