pub struct ArgumentSpec {
pub name: String,
pub description: Option<String>,
pub required: bool,
pub variadic: bool,
pub arg_type: Option<ArgumentType>,
pub placeholder: Option<String>,
}Expand description
Structured description of a command argument/parameter.
Fields§
§name: StringArgument name/placeholder, e.g. “FILE”, “PATTERN”, “PORT”
description: Option<String>Description of the argument, if available.
required: boolWhether the argument is required (true for ARG, false for [ARG]).
variadic: boolWhether the argument is variadic (true for ARG...).
arg_type: Option<ArgumentType>Inferred type of the argument.
placeholder: Option<String>Original placeholder text, e.g. "<FILE>", "[PATH]", "<PATTERN>..."
Trait Implementations§
Source§impl Clone for ArgumentSpec
impl Clone for ArgumentSpec
Source§fn clone(&self) -> ArgumentSpec
fn clone(&self) -> ArgumentSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArgumentSpec
impl Debug for ArgumentSpec
Source§impl<'de> Deserialize<'de> for ArgumentSpec
impl<'de> Deserialize<'de> for ArgumentSpec
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 ArgumentSpec
impl RefUnwindSafe for ArgumentSpec
impl Send for ArgumentSpec
impl Sync for ArgumentSpec
impl Unpin for ArgumentSpec
impl UnwindSafe for ArgumentSpec
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