Enum clap::ArgSettings
source · [−]pub enum ArgSettings {
Show 18 variants
Required,
Multiple,
EmptyValues,
Global,
Hidden,
TakesValue,
UseValueDelimiter,
NextLineHelp,
RequireDelimiter,
HidePossibleValues,
AllowLeadingHyphen,
RequireEquals,
Last,
HideDefaultValue,
CaseInsensitive,
HideEnvValues,
HiddenShortHelp,
HiddenLongHelp,
// some variants omitted
}
Expand description
Various settings that apply to arguments and may be set, unset, and checked via getter/setter
methods Arg::set
, Arg::unset
, and Arg::is_set
Variants
Required
The argument must be used
Multiple
The argument may be used multiple times such as --flag --flag
EmptyValues
The argument allows empty values such as --option ""
Global
The argument should be propagated down through all child SubCommand
s
Hidden
The argument should not be shown in help text
TakesValue
The argument accepts a value, such as --option <value>
UseValueDelimiter
Determines if the argument allows values to be grouped via a delimiter
NextLineHelp
Prints the help text on the line after the argument
RequireDelimiter
Requires the use of a value delimiter for all multiple values
HidePossibleValues
Hides the possible values from the help string
AllowLeadingHyphen
Allows vals that start with a ‘-’
RequireEquals
Require options use --option=val
syntax
Last
Specifies that the arg is the last positional argument and may be accessed early via --
syntax
HideDefaultValue
Hides the default value from the help string
CaseInsensitive
Makes Arg::possible_values
case insensitive
HideEnvValues
Hides ENV values in the help message
HiddenShortHelp
The argument should not be shown in short help text
HiddenLongHelp
The argument should not be shown in long help text
Trait Implementations
sourceimpl Clone for ArgSettings
impl Clone for ArgSettings
sourcefn clone(&self) -> ArgSettings
fn clone(&self) -> ArgSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ArgSettings
impl Debug for ArgSettings
sourceimpl FromStr for ArgSettings
impl FromStr for ArgSettings
sourceimpl PartialEq<ArgSettings> for ArgSettings
impl PartialEq<ArgSettings> for ArgSettings
impl Copy for ArgSettings
impl StructuralPartialEq for ArgSettings
Auto Trait Implementations
impl RefUnwindSafe for ArgSettings
impl Send for ArgSettings
impl Sync for ArgSettings
impl Unpin for ArgSettings
impl UnwindSafe for ArgSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more