LoadedWithin

Trait LoadedWithin 

pub trait LoadedWithin {
    type Output;

    // Required method
    fn within(self, loaded: &Loaded) -> Self::Output;
}
Expand description

Convert a LoadError or compatible Result to a SourceDiagnostic or SourceResult by adding the [Loaded] context.

Required Associated Types§

type Output

The enriched type that has the context factored in.

Required Methods§

fn within(self, loaded: &Loaded) -> Self::Output

Report an error, possibly in an external file.

Implementations on Foreign Types§

§

impl<T, E> LoadedWithin for Result<T, E>
where E: Into<LoadError>,

§

type Output = Result<T, EcoVec<SourceDiagnostic>>

§

fn within(self, loaded: &Loaded) -> <Result<T, E> as LoadedWithin>::Output

Implementors§

§

impl<E> LoadedWithin for E
where E: Into<LoadError>,