pub struct ArgParseError(/* private fields */);Expand description
An error produced while scanning CLI arguments.
Carries a fully-formatted, human-readable message. Implements
std::error::Error so it converts into anyhow::Error (or any other
Error-based error type) via ? without an explicit map_err.
The message field is private so every ArgParseError is built through
this module’s formatting helper, keeping wording consistent — construct
one only via the functions below, and read the message back with
ArgParseError::message.
Implementations§
Trait Implementations§
Source§impl Clone for ArgParseError
impl Clone for ArgParseError
Source§fn clone(&self) -> ArgParseError
fn clone(&self) -> ArgParseError
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 moreSource§impl Debug for ArgParseError
impl Debug for ArgParseError
Source§impl Display for ArgParseError
impl Display for ArgParseError
Source§impl Error for ArgParseError
impl Error for ArgParseError
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 ArgParseError
impl PartialEq for ArgParseError
Source§fn eq(&self, other: &ArgParseError) -> bool
fn eq(&self, other: &ArgParseError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ArgParseError
impl StructuralPartialEq for ArgParseError
Auto Trait Implementations§
impl Freeze for ArgParseError
impl RefUnwindSafe for ArgParseError
impl Send for ArgParseError
impl Sync for ArgParseError
impl Unpin for ArgParseError
impl UnsafeUnpin for ArgParseError
impl UnwindSafe for ArgParseError
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<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.