Skip to main content

IntoDiagnostic

Trait IntoDiagnostic 

Source
pub trait IntoDiagnostic {
    // Required method
    fn into_diagnostic(self) -> Diagnostic;
}
Expand description

Trait for converting error types into Diagnostic.

Implement this trait to provide rich diagnostic information for custom error types. The trait consumes the error (takes self by value) to allow moving owned data into the diagnostic.

Required Methods§

Source

fn into_diagnostic(self) -> Diagnostic

Convert self into a Diagnostic with error code, message, fragment, and other metadata.

Implementors§