pub struct Cli {Show 13 fields
pub input: String,
pub target: Option<Target>,
pub method: Option<Method>,
pub recursive: Option<bool>,
pub depth: Option<usize>,
pub nbits: Option<usize>,
pub start: Option<usize>,
pub with: Option<String>,
pub delimiter: Option<String>,
pub indiscriminate: bool,
pub yes: bool,
pub roll: bool,
pub cache: String,
}Fields§
§input: StringSource: File & directory
target: Option<Target>Target: File & directory
method: Option<Method>Methods for renaming
recursive: Option<bool>Doing recursively or not
depth: Option<usize>Depth when doing recursively
nbits: Option<usize>The number of bit
start: Option<usize>Initial number
with: Option<String>Text string for Method::Prefix & Method::Append
delimiter: Option<String>Delimiter
indiscriminate: boolNot preserving consistent file stems e.g. Files with the same filestem in the same folder should remain consistent after renaming
yes: boolExecute without asking
roll: boolRoll back
cache: StringCache file
Implementations§
Source§impl Cli
impl Cli
pub fn run(&mut self) -> Result<()>
pub fn rename(&mut self, theme: &ColorfulTheme) -> Result<()>
pub fn roll_back(&self) -> Result<()>
pub fn gen_uniq( &self, pf: &Path, pd: &Path, map_pd_cnt: &mut HashMap<PathBuf, usize>, map_pf_stem: &mut HashMap<PathBuf, String>, ) -> PathBuf
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 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