Trait tardar::ResultExt

source ·
pub trait ResultExt<T, E> {
    // Required method
    fn into_error_diagnostic<'d>(self) -> DiagnosticResult<'d, T>
       where E: 'd + Diagnostic;
}
Expand description

Extension methods for Results.

Required Methods§

source

fn into_error_diagnostic<'d>(self) -> DiagnosticResult<'d, T>where E: 'd + Diagnostic,

Converts from Result<T, E> into DiagnosticResult<'d, T>.

The error type E must be a Diagnostic and is interpreted as an error. Note that the Severity is not examined and so the Diagnostic may have a non-error severity despite being interpreted as an error.

Implementations on Foreign Types§

source§

impl<T, E> ResultExt<T, E> for Result<T, E>

source§

fn into_error_diagnostic<'d>(self) -> DiagnosticResult<'d, T>where E: 'd + Diagnostic,

Implementors§