pub enum UsageError {
Empty,
Unknown(OsString),
Unexpected(OsString),
NoValue(Argument),
Twice(Argument),
Missing(Argument),
NotUtf8 {
argument: Argument,
value: OsString,
},
NotLauncher(Command),
}Expand description
Why a command line is no command this reader runs.
Variants§
Empty
The command line is empty.
Unknown(OsString)
The first word names no command.
Unexpected(OsString)
A word the command does not take.
NoValue(Argument)
The argument is given with no value after it.
Twice(Argument)
The argument is given twice.
Missing(Argument)
The command needs the argument, and it is not given.
NotUtf8
The argument’s value is not UTF-8.
NotLauncher(Command)
A library’s launcher runs serve and extract only, and this is
another command.
Trait Implementations§
Source§impl Clone for UsageError
impl Clone for UsageError
Source§impl Debug for UsageError
impl Debug for UsageError
Source§impl Display for UsageError
impl Display for UsageError
impl Eq for UsageError
Source§impl Error for UsageError
impl Error for UsageError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for UsageError
impl PartialEq for UsageError
impl StructuralPartialEq for UsageError
Auto Trait Implementations§
impl Forget for UsageError
impl Freeze for UsageError
impl Move for UsageError
impl RefUnwindSafe for UsageError
impl Send for UsageErrorwhere
RawVecInner: Send,
impl Sync for UsageErrorwhere
RawVecInner: Sync,
impl Unpin for UsageError
impl UnsafeUnpin for UsageError
impl UnwindSafe for UsageErrorwhere
RawVecInner: UnwindSafe,
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