Trait WithSpan

Source
trait WithSpan<T, S: GetSpan> {
    // Required method
    fn with_span(self, top_span: S, vm: &VM<'_>) -> Result<T, Error>;
}
Expand description

Internal helper trait for ergonomically converting from a Result<T, ErrorKind> to a Result<T, Error> using the current span of a call frame, and chaining the VM’s frame stack around it for printing a cause chain.

Required Methods§

Source

fn with_span(self, top_span: S, vm: &VM<'_>) -> Result<T, Error>

Implementations on Foreign Types§

Source§

impl<T, S: GetSpan> WithSpan<T, S> for Result<T, ErrorKind>

Source§

fn with_span(self, top_span: S, vm: &VM<'_>) -> Result<T, Error>

Implementors§