pub struct Argument { /* private fields */ }
Implementations§
source§impl Argument
impl Argument
sourcepub fn is_required(self, required: bool) -> Self
pub fn is_required(self, required: bool) -> Self
Sets the Argument explicitly as required or not.
sourcepub fn with_type(self, arg_type: ArgumentType) -> Self
pub fn with_type(self, arg_type: ArgumentType) -> Self
Sets the type for the ArgumentParser to parse the arguments value into.
sourcepub fn with_description(self, description: &str) -> Self
pub fn with_description(self, description: &str) -> Self
Sets the description (Help string) of the argument for
sourcepub fn with_default_value(self, value: ArgumentValue) -> Self
pub fn with_default_value(self, value: ArgumentValue) -> Self
Sets the default value if the argument type matches the value or panics