Skip to main content

HintableErrorImpl

Trait HintableErrorImpl 

Source
trait HintableErrorImpl: OnlyTheMacroShouldImplementThis__ {
    // Required method
    fn hint_specific(&self) -> Option<ErrorHint<'_>>;
}
Expand description

Trait for an error that can provide a hint directly.

Not defined for errors whose sources may provide a hint.

To implement this trait, you need to provide an impl in this crate, and extend the macro invocation for hintable_impl!. Nothing else is currently supported.

Required Methods§

Source

fn hint_specific(&self) -> Option<ErrorHint<'_>>

If possible, provide a hint for how to solve this error.

(This should not check the source of this error or any other error; recursing is the job of best_hint. This is the method that should be implemented for an error type that might have a hint about how to solve that error in particular.)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl HintableErrorImpl for Error

Source§

impl HintableErrorImpl for ProtocolSupportError

Implementors§