Trait WithSpan

Source
pub trait WithSpan<T> {
    // Required method
    fn with_span<S: Into<Span>>(
        self,
        diag: &mut Diagnostics,
        span: S,
    ) -> Result<T, ()>;
}

Required Methods§

Source

fn with_span<S: Into<Span>>( self, diag: &mut Diagnostics, span: S, ) -> Result<T, ()>

Report the span to the diagnostics and convert the result into a unit error if failed.

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> WithSpan<T> for Result<T, Error>

Source§

fn with_span<S: Into<Span>>( self, diag: &mut Diagnostics, span: S, ) -> Result<T, ()>

Implementors§