pub struct CliArg {
pub field: &'static str,
pub short: Option<char>,
pub position: Option<usize>,
pub long: Option<&'static str>,
}Expand description
Presentation for one of a command’s parameters.
Only the parameters that need something beyond the default are declared. The default is a kebab-cased long flag, which is what most parameters want.
Fields§
§field: &'static strParameter name as the command deserializes it, e.g. harness_name.
short: Option<char>Short option, when the parameter is common enough to earn one.
Short options are declared, never derived: deriving from first letters collides, and worse, shifts as fields are added, so a script written today breaks when an unrelated parameter appears next to it.
position: Option<usize>Position when the parameter is also spelled as a bare word, 1-based.
long: Option<&'static str>Long spelling, when it differs from the kebab-cased field name.
Implementations§
Trait Implementations§
impl Copy for CliArg
impl Eq for CliArg
impl StructuralPartialEq for CliArg
Auto Trait Implementations§
impl Freeze for CliArg
impl RefUnwindSafe for CliArg
impl Send for CliArg
impl Sync for CliArg
impl Unpin for CliArg
impl UnsafeUnpin for CliArg
impl UnwindSafe for CliArg
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