pub struct Cli {Show 13 fields
pub command: Option<Commands>,
pub files: Vec<PathBuf>,
pub format: Option<FormatArg>,
pub stdin_filepath: Option<PathBuf>,
pub output: Option<PathBuf>,
pub in_place: bool,
pub max_width: usize,
pub neural: bool,
pub check: bool,
pub diff: bool,
pub config: Option<PathBuf>,
pub range: Option<String>,
pub output_format: OutputFormat,
}Fields§
§command: Option<Commands>§files: Vec<PathBuf>Input files. Reads stdin if omitted.
format: Option<FormatArg>Input format (auto-detected from extension if omitted).
stdin_filepath: Option<PathBuf>Assume this filename when reading stdin (for format auto-detection).
output: Option<PathBuf>Output file (stdout if omitted).
in_place: boolModify files in place.
max_width: usizeMaximum line width (0 = unlimited).
neural: boolUse neural sentence detection (requires neural feature).
check: boolExit with code 1 if any file would change.
diff: boolShow a unified diff of what would change.
config: Option<PathBuf>Path to config file (default: .snapperrc.toml in current or parent dirs).
range: Option<String>Only format lines in this range (1-indexed, inclusive). Format: START:END.
output_format: OutputFormatOutput format for –check mode.
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
Append to
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>
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 Cli
impl Parser for Cli
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 Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnsafeUnpin for Cli
impl UnwindSafe for Cli
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