pub struct SurfaceArgument {Show 14 fields
pub id: String,
pub index: Option<usize>,
pub short: Option<char>,
pub long: Option<String>,
pub visible_short_aliases: Vec<char>,
pub short_aliases: Vec<char>,
pub visible_aliases: Vec<String>,
pub aliases: Vec<String>,
pub value_names: Vec<String>,
pub help: String,
pub requirement: SurfaceRequirement,
pub scope: SurfaceScope,
pub hidden: bool,
pub takes_values: bool,
}Expand description
One positional argument or flag in a Surface.
Fields§
§id: StringClap argument identifier.
index: Option<usize>Positional index, absent for options and flags.
short: Option<char>Short flag name.
long: Option<String>Long flag name without leading dashes.
visible_short_aliases: Vec<char>Visible short aliases.
short_aliases: Vec<char>All short aliases, including hidden aliases.
visible_aliases: Vec<String>Visible long aliases.
aliases: Vec<String>All long aliases, including hidden aliases.
value_names: Vec<String>Value names shown by Clap.
help: StringArgument description.
requirement: SurfaceRequirementWhether Clap requires the argument.
scope: SurfaceScopeWhether Clap propagates the argument to subcommands.
Whether Clap hides the argument.
takes_values: boolWhether the argument action accepts values.
Trait Implementations§
Source§impl Clone for SurfaceArgument
impl Clone for SurfaceArgument
Source§fn clone(&self) -> SurfaceArgument
fn clone(&self) -> SurfaceArgument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SurfaceArgument
impl Debug for SurfaceArgument
impl Eq for SurfaceArgument
Source§impl PartialEq for SurfaceArgument
impl PartialEq for SurfaceArgument
Source§impl Serialize for SurfaceArgument
impl Serialize for SurfaceArgument
impl StructuralPartialEq for SurfaceArgument
Auto Trait Implementations§
impl Freeze for SurfaceArgument
impl RefUnwindSafe for SurfaceArgument
impl Send for SurfaceArgument
impl Sync for SurfaceArgument
impl Unpin for SurfaceArgument
impl UnsafeUnpin for SurfaceArgument
impl UnwindSafe for SurfaceArgument
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more