pub struct UnitMode {
pub raw: bool,
pub human_readable: bool,
pub iec: bool,
pub si: bool,
pub kbytes: bool,
pub mbytes: bool,
pub gbytes: bool,
pub tbytes: bool,
}Expand description
Unit display mode flags, shared by subcommands that output sizes.
Control how sizes are displayed in output. By default, human-readable format with base 1024 (KiB, MiB, GiB, TiB) is used. You can specify exact units or enable base 1000 (kB, MB, GB, TB) with –si.
Fields§
§raw: boolShow raw numbers in bytes
human_readable: boolShow human-friendly numbers using base 1024 (default)
iec: boolUse 1024 as a base (KiB, MiB, GiB, TiB)
si: boolUse 1000 as a base (kB, MB, GB, TB)
kbytes: boolShow sizes in KiB, or kB with –si
mbytes: boolShow sizes in MiB, or MB with –si
gbytes: boolShow sizes in GiB, or GB with –si
tbytes: boolShow sizes in TiB, or TB with –si
Implementations§
Trait Implementations§
Source§impl Args for UnitMode
impl Args for UnitMode
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 FromArgMatches for UnitMode
impl FromArgMatches for UnitMode
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.Auto Trait Implementations§
impl Freeze for UnitMode
impl RefUnwindSafe for UnitMode
impl Send for UnitMode
impl Sync for UnitMode
impl Unpin for UnitMode
impl UnsafeUnpin for UnitMode
impl UnwindSafe for UnitMode
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