Skip to main content

AlkahestError

Trait AlkahestError 

Source
pub trait AlkahestError: Error {
    // Required method
    fn code(&self) -> &'static str;

    // Provided methods
    fn remediation(&self) -> Option<&'static str> { ... }
    fn span(&self) -> Option<(usize, usize)> { ... }
}
Expand description

Core trait shared by every alkahest-core error type.

Required Methods§

Source

fn code(&self) -> &'static str

Stable diagnostic code, e.g. "E-DIFF-001".

Provided Methods§

Source

fn remediation(&self) -> Option<&'static str>

Optional human-readable fix suggestion.

Source

fn span(&self) -> Option<(usize, usize)>

Optional source span (start_byte, end_byte) within the input text.

Implementors§