pub struct DiagnosedError { /* private fields */ }Expand description
Internal error wrapper that carries a tip alongside the original error.
This is the actual type inserted into the anyhow chain. The CLI
extracts the tip by downcasting to Diagnosed (which this derefs to
via the chain’s source).
The Display impl delegates to the source error so the tip doesn’t
appear in the error message — only in the rendered output.
Implementations§
Trait Implementations§
Source§impl Debug for DiagnosedError
impl Debug for DiagnosedError
Source§impl Display for DiagnosedError
impl Display for DiagnosedError
Source§impl Error for DiagnosedError
impl Error for DiagnosedError
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()
Auto Trait Implementations§
impl Freeze for DiagnosedError
impl RefUnwindSafe for DiagnosedError
impl Send for DiagnosedError
impl Sync for DiagnosedError
impl Unpin for DiagnosedError
impl UnsafeUnpin for DiagnosedError
impl UnwindSafe for DiagnosedError
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