pub enum ArgKind {
String,
Char,
Bool,
Int,
Pattern,
Chord,
Body,
Raw,
}Expand description
Type tag for an argument. Mirrors ArgValue one-for-one and is
what an args_schema entry declares for each positional argument.
Variants§
String
Free-form text (ArgValue::String).
Char
A single character (ArgValue::Char).
Bool
A flag (ArgValue::Bool).
Int
A signed integer (ArgValue::Int).
Pattern
A search pattern (ArgValue::Pattern).
Chord
A keyboard chord. UI surfaces switch the cmdline into
chord-capture mode while the cursor sits in this slot –
raw key events are translated to canonical chord notation
(<C-c>, <Esc>, …) and inserted as one token.
Body
A parsed sub-invocation (a CommandInvocation in its own right).
Raw
Unparsed text (host re-parses or interprets later).
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.