pub struct ArgSpec {
pub name: String,
pub long: Option<String>,
pub short: Option<char>,
pub required: bool,
pub help: String,
pub value_name: Option<String>,
pub default_value: Option<String>,
pub possible_values: Option<Vec<String>>,
}Expand description
Argument specification
Fields§
§name: StringArgument name (positional) or option name
long: Option<String>Long option name (e.g., “–output”)
short: Option<char>Short option name (e.g., “-o”)
required: boolWhether this argument is required
help: StringHelp text for this argument
value_name: Option<String>Value placeholder name (e.g., “FILE”)
default_value: Option<String>Default value if not provided
possible_values: Option<Vec<String>>List of allowed values
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ArgSpec
impl<'de> Deserialize<'de> for ArgSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ArgSpec
impl RefUnwindSafe for ArgSpec
impl Send for ArgSpec
impl Sync for ArgSpec
impl Unpin for ArgSpec
impl UnwindSafe for ArgSpec
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