pub trait HintableError: Sealed {
// Required method
fn hint(&self) -> Option<ErrorHint<'_>>;
}
Expand description
An error that can provide additional information about how to solve itself.
Required Methods§
Sourcefn hint(&self) -> Option<ErrorHint<'_>>
fn hint(&self) -> Option<ErrorHint<'_>>
Return a hint object explaining how to solve this error, if we have one.
Most errors won’t have obvious hints, but some do. For the ones that
do, we can return an ErrorHint
.
Right now, ErrorHint
is completely opaque: the only supported option
is to format it for human consumption.
Implementations on Foreign Types§
Source§impl HintableError for Error
Available on crate feature anyhow
only.
impl HintableError for Error
Available on crate feature
anyhow
only.