Skip to main content

DiagnosticResult

Type Alias DiagnosticResult 

Source
pub type DiagnosticResult<T> = Result<T, Diagnostic>;
Expand description

Fallible result with a keyed diagnostic. New fallible signatures return this instead of anyhow::Result: callers add context with Diagnostic::with_hint / Diagnostic::with_source and convert into anyhow::Error with ? or .into() (via anyhow’s blanket From) while the rest of the workspace migrates leaf to root.

Aliased Type§

pub enum DiagnosticResult<T> {
    Ok(T),
    Err(Diagnostic),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Diagnostic)

Contains the error value