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 Result
s.
Required Methods§
sourcefn into_error_diagnostic<'d>(self) -> DiagnosticResult<'d, T>where
E: 'd + Diagnostic,
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.