pub struct Cli {Show 30 fields
pub paths: Vec<PathBuf>,
pub lines: Vec<String>,
pub sections: Vec<String>,
pub recursive: bool,
pub list_sections: bool,
pub force: Option<String>,
pub mode: String,
pub verbose: bool,
pub json: bool,
pub temp_suffix: Option<String>,
pub encoding: String,
pub strict_ext: bool,
pub no_dereference: bool,
pub eol: String,
pub posix_exit: bool,
pub comment_style: Vec<String>,
pub interactive: bool,
pub dry_run: bool,
pub backup: Option<String>,
pub to_end: bool,
pub scan: bool,
pub check: bool,
pub pair: bool,
pub config: Option<PathBuf>,
pub atomic: bool,
pub no_backup: bool,
pub recover: bool,
pub recover_forward: bool,
pub completions: Option<Shell>,
pub man: bool,
}Fields§
§paths: Vec<PathBuf>File or directory paths to process
lines: Vec<String>Line range in format <start_line>:<end_line> or <start_line>:+
sections: Vec<String>Section ID to toggle. Use group:variant (e.g. db:postgres) for variant ops:
-S group flips a 2-variant pair; -S group:variant activates one variant
and comments siblings; -S group --force on/off applies to every variant.
recursive: boolRecursively walk directories
list_sections: boolList all section IDs found in files (discovery mode, no toggling)
force: Option<String>Force toggle state (on/off/invert)
mode: StringComment mode (auto/single/multi)
verbose: boolHuman-readable log lines to stderr
json: boolMachine-readable single-line JSON to stdout
temp_suffix: Option<String>Extension for atomic temp file
encoding: StringOverride file codec (UTF-8 only in Phase 0)
strict_ext: boolError if target is not .py
no_dereference: boolOperate on symlink itself instead of target
eol: StringEOL normalization: preserve, lf, or crlf
posix_exit: boolMap exit codes to sysexits.h values
comment_style: Vec<String>Override comment style: SINGLE [MULTI_START MULTI_END]
interactive: boolPrompt before modifying each file
dry_run: boolShow diff of changes without writing files
backup: Option<String>Create backup with given extension before modifying (e.g. –backup .bak)
to_end: boolExtend the last –line range to the end of file
scan: boolScan for section IDs without modifying files
check: boolValidate section integrity without modifying files. Requires –scan.
pair: boolEnforce exactly 2 variants in the targeted group; error otherwise. Pre-execution check — no file modifications occur on failure.
config: Option<PathBuf>Path to .toggleConfig TOML file
atomic: boolEnable atomic multi-file mode: all files succeed or none are modified. Implies –backup unless –no-backup is explicitly passed.
no_backup: boolDisable backup creation in atomic mode. Only valid with –atomic. WARNING: Without backups, rollback is not possible if the rename phase fails.
recover: boolRecover from an interrupted atomic operation. Default: rollback.
recover_forward: boolComplete an interrupted atomic commit instead of rolling back. Must be combined with –recover.
completions: Option<Shell>Generate shell completions for the given shell to stdout.
Example: toggle --completions bash > /etc/bash_completion.d/toggle
man: boolGenerate a roff-formatted man page to stdout.
Example: toggle --man > toggle.1 && man ./toggle.1
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
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 CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
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.