Trait Trace

Source
pub trait Trace<T> {
    // Required method
    fn trace<F>(
        self,
        world: Tracked<'_, dyn World + '_>,
        make_point: F,
        span: Span,
    ) -> Self
       where F: Fn() -> Tracepoint;
}
Expand description

Enrich a SourceResult with a tracepoint.

Required Methods§

Source

fn trace<F>( self, world: Tracked<'_, dyn World + '_>, make_point: F, span: Span, ) -> Self
where F: Fn() -> Tracepoint,

Add the tracepoint to all errors that lie outside the span.

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> Trace<T> for Result<T, EcoVec<SourceDiagnostic>>

Source§

fn trace<F>( self, world: Tracked<'_, dyn World + '_>, make_point: F, span: Span, ) -> Result<T, EcoVec<SourceDiagnostic>>
where F: Fn() -> Tracepoint,

Implementors§