pub enum ArgumentKind {
Mandatory,
Optional,
Star,
Group,
Delimited {
open: Delimiter,
close: Delimiter,
},
Paired {
open: Delimiter,
close: Delimiter,
},
}Expand description
Argument type.
Variants§
Mandatory
Standard mandatory argument (m).
Optional
Standard optional bracket argument (o).
Star
Star argument (s).
Group
Braced group argument (g or m{}).
Requiredness is enforced by the spec/parser rather than this enum.
Delimited
Single delimited argument (r / d) with matched delimiters.
Paired
Paired-candidate argument (r / d with <l,r> pair list) with matched delimiters.
Implementations§
Source§impl ArgumentKind
impl ArgumentKind
Sourcepub const fn from_required(required: bool) -> Self
pub const fn from_required(required: bool) -> Self
Create an ArgumentKind for standard forms from requiredness.
Trait Implementations§
Source§impl Clone for ArgumentKind
impl Clone for ArgumentKind
Source§fn clone(&self) -> ArgumentKind
fn clone(&self) -> ArgumentKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ArgumentKind
Source§impl Debug for ArgumentKind
impl Debug for ArgumentKind
Source§impl<'de> Deserialize<'de> for ArgumentKind
impl<'de> Deserialize<'de> for ArgumentKind
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 ArgumentKind
Source§impl PartialEq for ArgumentKind
impl PartialEq for ArgumentKind
Source§fn eq(&self, other: &ArgumentKind) -> bool
fn eq(&self, other: &ArgumentKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ArgumentKind
impl Serialize for ArgumentKind
impl StructuralPartialEq for ArgumentKind
Auto Trait Implementations§
impl Freeze for ArgumentKind
impl RefUnwindSafe for ArgumentKind
impl Send for ArgumentKind
impl Sync for ArgumentKind
impl Unpin for ArgumentKind
impl UnsafeUnpin for ArgumentKind
impl UnwindSafe for ArgumentKind
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