#[non_exhaustive]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,
}Available on crate feature
surface-model only.Expand description
One positional argument or flag in a Surface, which Surface::new
builds. A field can join it in a minor release.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.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§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
Available on crate feature surface-serde only.
impl Serialize for SurfaceArgument
Available on crate feature
surface-serde only.impl StructuralPartialEq for SurfaceArgument
Auto Trait Implementations§
impl Forget for SurfaceArgument
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