pub struct ParseCommandError(pub Cow<'static, str>);Expand description
Raised by either Commander or a NamedCommandParser if the supplied string slice could
not be parsed into a valid Command object.
Tuple Fields§
§0: Cow<'static, str>Implementations§
Source§impl ParseCommandError
impl ParseCommandError
Sourcepub fn convert<E: ToString>(err: E) -> Self
pub fn convert<E: ToString>(err: E) -> Self
Converts anything representable as a String into a ParseCommandError, consuming
the original. This is mostly used in error conversion; e.g., in Result::map_err().
Trait Implementations§
Source§impl Clone for ParseCommandError
impl Clone for ParseCommandError
Source§fn clone(&self) -> ParseCommandError
fn clone(&self) -> ParseCommandError
Returns a duplicate of the value. Read more
1.0.0 · 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 ParseCommandError
impl Debug for ParseCommandError
Source§impl Display for ParseCommandError
impl Display for ParseCommandError
Source§impl Error for ParseCommandError
impl Error for ParseCommandError
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 ParseCommandError
impl PartialEq for ParseCommandError
impl Eq for ParseCommandError
impl StructuralPartialEq for ParseCommandError
Auto Trait Implementations§
impl Freeze for ParseCommandError
impl RefUnwindSafe for ParseCommandError
impl Send for ParseCommandError
impl Sync for ParseCommandError
impl Unpin for ParseCommandError
impl UnwindSafe for ParseCommandError
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