Trait Reportable

Source
pub trait Reportable<T> {
    // Required methods
    fn or_report(self, errors: &mut ErrorHandler<'_>) -> Option<T>;
    fn report(self, errors: &mut ErrorHandler<'_>) -> Self;
}

Required Methods§

Source

fn or_report(self, errors: &mut ErrorHandler<'_>) -> Option<T>

Report the error, then discard the error, returning Some if it was Ok

Source

fn report(self, errors: &mut ErrorHandler<'_>) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T, E> Reportable<T> for Result<T, E>
where E: CompilationError,

Source§

fn report(self, errors: &mut ErrorHandler<'_>) -> Self

Source§

fn or_report(self, errors: &mut ErrorHandler<'_>) -> Option<T>

Implementors§