HintableError

Trait HintableError 

Source
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§

Source

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.

Implementors§