Struct parallel_disk_usage::args::Args
source · [−]pub struct Args {Show 14 fields
pub files: Vec<PathBuf>,
pub json_input: bool,
pub json_output: bool,
pub bytes_format: BytesFormat,
pub top_down: bool,
pub align_left: bool,
pub quantity: Quantity,
pub max_depth: NonZeroUsize,
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,
}
Expand description
The CLI arguments.
Fields
files: Vec<PathBuf>
List of files and/or directories.
json_input: bool
Read JSON data from stdin.
json_output: bool
Print JSON data instead of an ASCII chart.
bytes_format: BytesFormat
How to display the numbers of bytes.
top_down: bool
Print the tree top-down instead of bottom-up.
align_left: bool
Fill the bars from left to right.
quantity: Quantity
Aspect of the files/directories to be measured.
max_depth: NonZeroUsize
Maximum depth to display the data (must be greater than 0).
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: Fraction
Minimal size proportion required to appear.
no_sort: bool
Preserve order of entries.
silent_errors: bool
Prevent filesystem error messages from appearing in stderr.
progress: bool
Report progress being made at the expense of performance.
Trait Implementations
sourceimpl StructOpt for Args
impl StructOpt for Args
sourcefn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Builds the struct from clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic. Read more
sourcefn from_args() -> Self
fn from_args() -> Self
Builds the struct from the command line arguments (std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program. Read more
sourcefn from_args_safe() -> Result<Self, Error>
fn from_args_safe() -> Result<Self, Error>
Builds the struct from the command line arguments (std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you. Read more
sourcefn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making.
Print the error message and quit the program in case of failure. Read more
sourcefn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more
Auto Trait Implementations
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<X> Pipe for X
impl<X> Pipe for X
sourcefn pipe<Return, Function>(self, f: Function) -> Return where
Function: FnOnce(Self) -> Return,
fn pipe<Return, Function>(self, f: Function) -> Return where
Function: FnOnce(Self) -> Return,
Apply f
to self
. Read more
sourcefn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return where
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return where
Function: FnOnce(&'a Self) -> Return,
Apply f
to &self
. Read more
sourcefn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return where
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return where
Function: FnOnce(&'a mut Self) -> Return,
Apply f
to &mut self
. Read more
sourcefn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply f
to &self
where f
takes a single parameter of type Param
and Self
implements trait AsRef<Param>
. Read more
sourcefn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return where
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return where
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply f
to &mut self
where f
takes a single parameter of type Param
and Self
implements trait AsMut<Param>
. Read more
sourcefn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply f
to &self
where f
takes a single parameter of type Param
and Self
implements trait Deref<Target = Param>
. Read more
sourcefn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
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
) -> Return where
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply f
to &mut self
where f
takes a single parameter of type Param
and Self
implements trait [DerefMut<Target = Param>
]. Read more
sourcefn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply f
to &self
where f
takes a single parameter of type Param
and Self
implements trait Borrow<Param>
. Read more
sourcefn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply f
to &mut self
where f
takes a single parameter of type Param
and Self
implements trait BorrowMut<Param>
. Read more
sourceimpl<X> Pipe for X
impl<X> Pipe for X
sourcefn pipe<Return, Function>(self, f: Function) -> Return where
Function: FnOnce(Self) -> Return,
fn pipe<Return, Function>(self, f: Function) -> Return where
Function: FnOnce(Self) -> Return,
Apply f
to self
. Read more
sourcefn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return where
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return where
Function: FnOnce(&'a Self) -> Return,
Apply f
to &self
. Read more
sourcefn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return where
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return where
Function: FnOnce(&'a mut Self) -> Return,
Apply f
to &mut self
. Read more
sourcefn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply f
to &self
where f
takes a single parameter of type Param
and Self
implements trait AsRef<Param>
. Read more
sourcefn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return where
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return where
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply f
to &mut self
where f
takes a single parameter of type Param
and Self
implements trait AsMut<Param>
. Read more
sourcefn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply f
to &self
where f
takes a single parameter of type Param
and Self
implements trait Deref<Param>
. Read more
sourcefn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
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
) -> Return where
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply f
to &mut self
where f
takes a single parameter of type Param
and Self
implements trait DerefMut<Param>
. Read more
sourcefn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
Apply f
to &self
where f
takes a single parameter of type Param
and Self
implements trait Deref<Param>
. Read more
sourcefn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply f
to &mut self
where f
takes a single parameter of type Param
and Self
implements trait DerefMut<Param>
. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<Args> StructOptUtils for Args where
Args: StructOpt,
impl<Args> StructOptUtils for Args where
Args: StructOpt,
sourcefn strict_from_iter(
input: impl IntoIterator<Item = impl Into<OsString> + Clone>
) -> Self
fn strict_from_iter(
input: impl IntoIterator<Item = impl Into<OsString> + Clone>
) -> Self
If the flags are invalid or unknown, print error and exit with code 1.
If --help
, print help message and exit with code 0.
If --version
, print version and exit with code 0.
Otherwise, return parsing result. Read more
sourcefn strict_from_args() -> Self
fn strict_from_args() -> Self
Apply parse_strict
on main CLI arguments.
sourcefn run_completion_generator(name: &str, bin: &str)
fn run_completion_generator(name: &str, bin: &str)
Run completion generator program.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more