pub struct ParameterInfo {
pub anchor: String,
pub name: String,
pub display: String,
pub display_names: String,
pub description: Option<String>,
pub required: bool,
pub multiple: bool,
pub takes_value: bool,
pub value_names: Vec<String>,
pub default_values: Vec<String>,
pub env: Option<String>,
pub possible_values: Vec<String>,
}Expand description
Information available to parameter formatting callbacks.
Fields§
§anchor: StringStable anchor id for this parameter.
name: Stringclap argument id.
display: StringFull display form, such as -c <CONFIG>, --config <CONFIG>.
display_names: StringDisplay form without values, such as -c, --config.
description: Option<String>Parameter description, if one is configured.
required: boolWhether this parameter is required.
multiple: boolWhether this parameter accepts multiple occurrences or values.
takes_value: boolWhether this parameter takes a value.
value_names: Vec<String>clap value names.
default_values: Vec<String>clap default values.
env: Option<String>Environment variable name, if one is configured.
possible_values: Vec<String>Possible values exposed by the clap value parser.
Trait Implementations§
Source§impl Clone for ParameterInfo
impl Clone for ParameterInfo
Source§fn clone(&self) -> ParameterInfo
fn clone(&self) -> ParameterInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParameterInfo
impl RefUnwindSafe for ParameterInfo
impl Send for ParameterInfo
impl Sync for ParameterInfo
impl Unpin for ParameterInfo
impl UnsafeUnpin for ParameterInfo
impl UnwindSafe for ParameterInfo
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