pub struct WithUsage<'a> { /* private fields */ }Expand description
An Error followed by a usage line and a help hint, returned by Error::with_usage.
Its Display writes the message of the error, a blank line, the usage line, another blank
line and For more information, try '--help'. (left out when the command has no help flag),
like the end of a Clap error:
invalid value 'x' for '--mode <MODE>'
[possible values: fast, slow]
Usage: run [OPTIONS]
For more information, try '--help'.Error::Help and Error::Version are not failures and are written alone.
Implementations§
Trait Implementations§
impl<'a> Copy for WithUsage<'a>
impl<'a> Eq for WithUsage<'a>
Source§impl Error for WithUsage<'_>
impl Error for WithUsage<'_>
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()
impl<'a> StructuralPartialEq for WithUsage<'a>
Auto Trait Implementations§
impl<'a> Forget for WithUsage<'a>
impl<'a> Freeze for WithUsage<'a>
impl<'a> Move for WithUsage<'a>
impl<'a> RefUnwindSafe for WithUsage<'a>
impl<'a> Send for WithUsage<'a>
impl<'a> Sync for WithUsage<'a>
impl<'a> Unpin for WithUsage<'a>
impl<'a> UnsafeUnpin for WithUsage<'a>
impl<'a> UnwindSafe for WithUsage<'a>
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