pub trait ObjectSafeTracer {
    // Required methods
    fn start_with_context_boxed(
        &self,
        name: Cow<'static, str>,
        parent_cx: &Context
    ) -> Box<dyn ObjectSafeSpan + Send + Sync>;
    fn build_with_context_boxed(
        &self,
        builder: SpanBuilder,
        parent_cx: &Context
    ) -> Box<dyn ObjectSafeSpan + Send + Sync>;
}
Expand description

Allows a specific Tracer to be used generically by BoxedTracer instances by mirroring the interface and boxing the return types.

Required Methods§

source

fn start_with_context_boxed( &self, name: Cow<'static, str>, parent_cx: &Context ) -> Box<dyn ObjectSafeSpan + Send + Sync>

Returns a trait object so the underlying implementation can be swapped out at runtime.

source

fn build_with_context_boxed( &self, builder: SpanBuilder, parent_cx: &Context ) -> Box<dyn ObjectSafeSpan + Send + Sync>

Returns a trait object so the underlying implementation can be swapped out at runtime.

Implementors§

source§

impl<S, T> ObjectSafeTracer for Twhere S: Span + Send + Sync + 'static, T: Tracer<Span = S>,