/// Construct a new error with the associated span.
Construct a new error with the associated span.
Construct a new error with the associated span .
pub fn new<E>(span: Span, error: E) -> Self
    where
        anyhow::Error: From<E>,
    {
        Self {
            span,
            inner: anyhow::Error::from(error),
        }
    }
pub fn new < E > ( span : Span , error : E ) -> Self where anyhow :: Error : From < E > , { Self { span , inner : anyhow :: Error :: from ( error ) , } }
Construct a new error with the associated span.
Construct a new error with the associated span .
span
Span
error
E