Skip to main content

Hint

Trait Hint 

Source
pub trait Hint {
    // Provided method
    fn hints(&self) -> Hints<'_> { ... }
}
Expand description

An error that may carry user-facing hints.

Implement this on error types that want to surface contextual suggestions (e.g., “try --prerelease=allow”) to the diagnostics layer. Hints are rendered after the error output, each prefixed with hint:.

Provided Methods§

Source

fn hints(&self) -> Hints<'_>

Return any hints associated with this error.

Implementors§