Trait ObjectSafeTracer
pub trait ObjectSafeTracer {
// Required method
fn build_with_context_boxed(
&self,
builder: SpanBuilder,
parent_cx: &Context,
) -> Box<dyn ObjectSafeSpan + Sync + Send>;
}
Expand description
Allows a specific Tracer
to be used generically by BoxedTracer
instances by mirroring the interface and boxing the return types.
Required Methods§
fn build_with_context_boxed(
&self,
builder: SpanBuilder,
parent_cx: &Context,
) -> Box<dyn ObjectSafeSpan + Sync + Send>
fn build_with_context_boxed( &self, builder: SpanBuilder, parent_cx: &Context, ) -> Box<dyn ObjectSafeSpan + Sync + Send>
Returns a trait object so the underlying implementation can be swapped out at runtime.