pub(crate) trait AddSpan: Sized {
type Output;
// Required methods
fn with_span(self) -> Self::Output;
fn with_span_static(
self,
span: Span,
description: &'static str,
) -> Self::Output;
fn with_span_context(self, span_context: SpanContext) -> Self::Output;
fn with_span_handle<T, A: SpanProvider<T>>(
self,
handle: Handle<T>,
arena: &A,
) -> Self::Output;
}
Expand description
Convenience trait for Error
to be able to apply spans to anything.
Required Associated Types§
Required Methods§
Sourcefn with_span(self) -> Self::Output
fn with_span(self) -> Self::Output
See WithSpan::new
.
Sourcefn with_span_static(self, span: Span, description: &'static str) -> Self::Output
fn with_span_static(self, span: Span, description: &'static str) -> Self::Output
See WithSpan::with_span
.
Sourcefn with_span_context(self, span_context: SpanContext) -> Self::Output
fn with_span_context(self, span_context: SpanContext) -> Self::Output
Sourcefn with_span_handle<T, A: SpanProvider<T>>(
self,
handle: Handle<T>,
arena: &A,
) -> Self::Output
fn with_span_handle<T, A: SpanProvider<T>>( self, handle: Handle<T>, arena: &A, ) -> Self::Output
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.