pub enum UnknownFlags {
Value,
Error,
}Expand description
What to do with a flag-like token that names no flag in scope.
The default is UnknownFlags::Value: the token carries on to the positional
arguments, because a spec is often parsing a command line whose flags belong to
something else — a wrapped tool, a task script. A CLI that owns all of its
flags declares UnknownFlags::Error and gets typo detection instead.
Stored per command and already resolved: inheritance is a question for whoever builds the tables, and answering it at compile time keeps it out of the parse.
Variants§
Value
Offer the token to the positionals. If none can take it, it is an unexpected argument.
Error
Reject the token.
Trait Implementations§
Source§impl Clone for UnknownFlags
impl Clone for UnknownFlags
Source§fn clone(&self) -> UnknownFlags
fn clone(&self) -> UnknownFlags
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 UnknownFlags
Source§impl Debug for UnknownFlags
impl Debug for UnknownFlags
Source§impl Default for UnknownFlags
impl Default for UnknownFlags
Source§fn default() -> UnknownFlags
fn default() -> UnknownFlags
Returns the “default value” for a type. Read more
impl Eq for UnknownFlags
Source§impl PartialEq for UnknownFlags
impl PartialEq for UnknownFlags
impl StructuralPartialEq for UnknownFlags
Auto Trait Implementations§
impl Freeze for UnknownFlags
impl RefUnwindSafe for UnknownFlags
impl Send for UnknownFlags
impl Sync for UnknownFlags
impl Unpin for UnknownFlags
impl UnsafeUnpin for UnknownFlags
impl UnwindSafe for UnknownFlags
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