Skip to main content

EmitError

Trait EmitError 

Source
pub trait EmitError {
    type Output;

    // Required method
    fn emit<C: DiagEmitter>(self, ctx: C) -> Self::Output;
}
Expand description

Emit errors as diagnostics.

Useful if implemented on the error types returned from results. Allows these results to be emitted as diagnostics on-the-fly and converted to a () error type result.

Required Associated Types§

Required Methods§

Source

fn emit<C: DiagEmitter>(self, ctx: C) -> Self::Output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E: EmitError> EmitError for Result<T, E>

Source§

type Output = Result<T, <E as EmitError>::Output>

Source§

fn emit<C: DiagEmitter>(self, ctx: C) -> Result<T, E::Output>

Implementors§