pub enum NArgs {
Fixed(usize),
ZeroOrMore,
OneOrMore,
Optional,
AtLeast(usize),
}Expand description
How many arguments a positional slot or keyword takes.
In TOML this can be written as:
- integer
nargs = 1→Fixed(1) "*"→ZeroOrMore"+"→OneOrMore"?"→Optional"N+"e.g."2+"→AtLeast(2)
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NArgs
impl<'de> Deserialize<'de> for NArgs
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NArgs
impl StructuralPartialEq for NArgs
Auto Trait Implementations§
impl Freeze for NArgs
impl RefUnwindSafe for NArgs
impl Send for NArgs
impl Sync for NArgs
impl Unpin for NArgs
impl UnsafeUnpin for NArgs
impl UnwindSafe for NArgs
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.