#[non_exhaustive]pub struct ArgSpec {
pub name: String,
pub kind: ArgKind,
pub help: Option<String>,
pub required: bool,
}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.name: String§kind: ArgKindAlways ArgKind::Positional today. Kept as a discriminator
so the JSON shape can grow new arg kinds later without
renaming fields (see #215 for the design pass).
help: Option<String>§required: booltrue when the arg has no default and no Option<T> wrapper.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArgSpec
impl RefUnwindSafe for ArgSpec
impl Send for ArgSpec
impl Sync for ArgSpec
impl Unpin for ArgSpec
impl UnsafeUnpin for ArgSpec
impl UnwindSafe for ArgSpec
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