Trait ErrSpan

Source
pub trait ErrSpan {
    type Result;

    // Required method
    fn err_span(self, span: Span) -> Self::Result;
}
Expand description

An extension trait for Result, which adds a span to the error type.

This trait might be removed later, since the old Spanned<std::io::Error> to ShellError conversion was replaced by IoError.

Required Associated Types§

Required Methods§

Source

fn err_span(self, span: Span) -> Self::Result

Adds the given span to the error type, turning it into a Spanned<E>.

Implementations on Foreign Types§

Source§

impl<T, E> ErrSpan for Result<T, E>

Source§

type Result = Result<T, Spanned<E>>

Source§

fn err_span(self, span: Span) -> <Result<T, E> as ErrSpan>::Result

Implementors§