pub enum ArgKind {
Boolean,
Integer,
Number,
String,
StringList,
IntegerList,
Json,
}Expand description
What one argument accepts.
A reduction of JSON Schema to the shapes a command line has: everything else is passed as one JSON document, because a shell argument is text and pretending otherwise only moves the parse somewhere less helpful.
Variants§
Boolean
A switch. Accepts --flag and --flag true, because callers write
both and one of them erroring is a round trip spent on syntax.
Integer
Number
String
StringList
Repeatable, and comma-splittable when the items are scalars.
IntegerList
Json
An object or array of objects: one JSON document.
Trait Implementations§
impl Copy for ArgKind
Source§impl<'de> Deserialize<'de> for ArgKind
impl<'de> Deserialize<'de> for ArgKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ArgKind
impl StructuralPartialEq for ArgKind
Auto Trait Implementations§
impl Freeze for ArgKind
impl RefUnwindSafe for ArgKind
impl Send for ArgKind
impl Sync for ArgKind
impl Unpin for ArgKind
impl UnsafeUnpin for ArgKind
impl UnwindSafe for ArgKind
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