pub struct PositionalDecl {
pub name: String,
pub required: bool,
pub variadic: bool,
pub choices: Option<Vec<String>>,
}Expand description
Declaration of a single positional argument.
Fields§
§name: StringField name (used in error messages).
required: boolWhen true, absence is a parse error.
variadic: boolWhen true, consumes all remaining positionals; must be the last decl.
choices: Option<Vec<String>>Restrict values to this set.
Trait Implementations§
Source§impl Clone for PositionalDecl
impl Clone for PositionalDecl
Source§fn clone(&self) -> PositionalDecl
fn clone(&self) -> PositionalDecl
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 moreAuto Trait Implementations§
impl Freeze for PositionalDecl
impl RefUnwindSafe for PositionalDecl
impl Send for PositionalDecl
impl Sync for PositionalDecl
impl Unpin for PositionalDecl
impl UnsafeUnpin for PositionalDecl
impl UnwindSafe for PositionalDecl
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