#[non_exhaustive]pub struct Args {Show 19 fields
pub files: Vec<PathBuf>,
pub json_input: bool,
pub json_output: bool,
pub bytes_format: BytesFormat,
pub deduplicate_hardlinks: bool,
pub one_file_system: bool,
pub top_down: bool,
pub align_right: bool,
pub quantity: Quantity,
pub max_depth: Depth,
pub total_width: Option<usize>,
pub column_width: Option<Vec<usize>>,
pub min_ratio: Fraction,
pub no_sort: bool,
pub silent_errors: bool,
pub progress: bool,
pub threads: Threads,
pub omit_json_shared_details: bool,
pub omit_json_shared_summary: bool,
}Expand description
The CLI arguments.
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.files: Vec<PathBuf>List of files and/or directories.
json_input: boolRead JSON data from stdin.
json_output: boolPrint JSON data instead of an ASCII chart.
bytes_format: BytesFormatHow to display the numbers of bytes.
deduplicate_hardlinks: boolDetect and subtract the sizes of hardlinks from their parent directory totals.
one_file_system: boolSkip directories on different filesystems.
top_down: boolPrint the tree top-down instead of bottom-up.
align_right: boolSet the root of the bars to the right.
quantity: QuantityAspect of the files/directories to be measured.
max_depth: DepthMaximum depth to display the data. Could be either “inf” or a positive integer.
total_width: Option<usize>Width of the visualization.
column_width: Option<Vec<usize>>Maximum widths of the tree column and width of the bar column.
min_ratio: FractionMinimal size proportion required to appear.
no_sort: boolDo not sort the branches in the tree.
silent_errors: boolPrevent filesystem error messages from appearing in stderr.
progress: boolReport progress being made at the expense of performance.
threads: ThreadsSet the maximum number of threads to spawn. Could be either “auto”, “max”, or a positive integer.
Do not output .shared.details in the JSON output.
Do not output .shared.summary in the JSON output.
Implementations§
Source§impl Args
impl Args
Sourcepub fn with_files(self, value: Vec<PathBuf>) -> Self
pub fn with_files(self, value: Vec<PathBuf>) -> Self
Sets the files field of this struct.
Sourcepub fn with_json_input(self, value: bool) -> Self
pub fn with_json_input(self, value: bool) -> Self
Sets the json_input field of this struct.
Sourcepub fn with_json_output(self, value: bool) -> Self
pub fn with_json_output(self, value: bool) -> Self
Sets the json_output field of this struct.
Sourcepub fn with_bytes_format(self, value: BytesFormat) -> Self
pub fn with_bytes_format(self, value: BytesFormat) -> Self
Sets the bytes_format field of this struct.
Sourcepub fn with_deduplicate_hardlinks(self, value: bool) -> Self
pub fn with_deduplicate_hardlinks(self, value: bool) -> Self
Sets the deduplicate_hardlinks field of this struct.
Sourcepub fn with_one_file_system(self, value: bool) -> Self
pub fn with_one_file_system(self, value: bool) -> Self
Sets the one_file_system field of this struct.
Sourcepub fn with_top_down(self, value: bool) -> Self
pub fn with_top_down(self, value: bool) -> Self
Sets the top_down field of this struct.
Sourcepub fn with_align_right(self, value: bool) -> Self
pub fn with_align_right(self, value: bool) -> Self
Sets the align_right field of this struct.
Sourcepub fn with_quantity(self, value: Quantity) -> Self
pub fn with_quantity(self, value: Quantity) -> Self
Sets the quantity field of this struct.
Sourcepub fn with_max_depth(self, value: Depth) -> Self
pub fn with_max_depth(self, value: Depth) -> Self
Sets the max_depth field of this struct.
Sourcepub fn with_total_width(self, value: Option<usize>) -> Self
pub fn with_total_width(self, value: Option<usize>) -> Self
Sets the total_width field of this struct.
Sourcepub fn with_column_width(self, value: Option<Vec<usize>>) -> Self
pub fn with_column_width(self, value: Option<Vec<usize>>) -> Self
Sets the column_width field of this struct.
Sourcepub fn with_min_ratio(self, value: Fraction) -> Self
pub fn with_min_ratio(self, value: Fraction) -> Self
Sets the min_ratio field of this struct.
Sourcepub fn with_no_sort(self, value: bool) -> Self
pub fn with_no_sort(self, value: bool) -> Self
Sets the no_sort field of this struct.
Sourcepub fn with_silent_errors(self, value: bool) -> Self
pub fn with_silent_errors(self, value: bool) -> Self
Sets the silent_errors field of this struct.
Sourcepub fn with_progress(self, value: bool) -> Self
pub fn with_progress(self, value: bool) -> Self
Sets the progress field of this struct.
Sourcepub fn with_threads(self, value: Threads) -> Self
pub fn with_threads(self, value: Threads) -> Self
Sets the threads field of this struct.
Sets the omit_json_shared_details field of this struct.
Sets the omit_json_shared_summary field of this struct.
Trait Implementations§
Source§impl Args for Args
impl Args for Args
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 Args
impl CommandFactory for Args
Source§impl Default for Args
impl Default for Args
Source§fn default() -> Self
fn default() -> Self
Return Args { files: Default::default(), json_input: Default::default(), json_output: Default::default(), bytes_format: BytesFormat::MetricUnits, deduplicate_hardlinks: Default::default(), one_file_system: Default::default(), top_down: Default::default(), align_right: Default::default(), quantity: Quantity::DEFAULT, max_depth: 10.try_into().unwrap(), total_width: Default::default(), column_width: Default::default(), min_ratio: Default::default(), no_sort: Default::default(), silent_errors: Default::default(), progress: Default::default(), threads: Default::default(), omit_json_shared_details: Default::default(), omit_json_shared_summary: Default::default() }
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
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 Parser for Args
impl Parser for Args
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 Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnsafeUnpin for Args
impl UnwindSafe for Args
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<App> CommandFactoryExtra for Appwhere
App: CommandFactory,
impl<App> CommandFactoryExtra for Appwhere
App: CommandFactory,
Source§fn get_completion<Completion, Name>(name: Name, shell: Shell) -> Completion
fn get_completion<Completion, Name>(name: Name, shell: Shell) -> Completion
Source§fn get_completion_string(
name: impl Into<String>,
shell: Shell,
) -> Result<String, Utf8Error>
fn get_completion_string( name: impl Into<String>, shell: Shell, ) -> Result<String, Utf8Error>
Source§fn generate_completion(generator: CompletionGenerator) -> Result<(), Error>
fn generate_completion(generator: CompletionGenerator) -> Result<(), Error>
Source§fn run_completion_generator() -> ExitCode
fn run_completion_generator() -> ExitCode
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 moreSource§impl<X> Pipe for X
impl<X> Pipe for X
Source§fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
Source§fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
Source§fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read moreSource§fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read moreSource§fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Target = Param>. Read moreSource§fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Target = Param>. Read moreSource§fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait Borrow<Param>. Read moreSource§fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Return
fn pipe_borrow_mut<'a, Param, Return, Function>( &'a mut self, f: Function, ) -> Return
f to &mut self where f takes a single parameter of type Param
and Self implements trait BorrowMut<Param>. Read more