Struct rustracing_jaeger::span::SpanContextStateBuilder
source · pub struct SpanContextStateBuilder { /* private fields */ }
Expand description
SpanContextState
builder.
Normally it is recommended to build SpanContextState
using APIs provided by Tracer
or SpanContext
rather than via this.
But it may be useful, for example, if you want to handle custom carrier formats that are not defined in the OpenTracing specification.
Implementations§
source§impl SpanContextStateBuilder
impl SpanContextStateBuilder
sourcepub fn trace_id(self, trace_id: TraceId) -> Self
pub fn trace_id(self, trace_id: TraceId) -> Self
Sets the trace identifier.
The default value is TraceId::new()
.
sourcepub fn span_id(self, span_id: u64) -> Self
pub fn span_id(self, span_id: u64) -> Self
Sets the span identifier.
The default value is rand::random()
.
sourcepub fn debug_id(self, debug_id: String) -> Self
pub fn debug_id(self, debug_id: String) -> Self
Sets the debug identifier.
It is not set by default.
sourcepub fn finish(self) -> SpanContextState
pub fn finish(self) -> SpanContextState
Builds a SpanContextState
instance with the specified parameters.
Trait Implementations§
source§impl Clone for SpanContextStateBuilder
impl Clone for SpanContextStateBuilder
source§fn clone(&self) -> SpanContextStateBuilder
fn clone(&self) -> SpanContextStateBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SpanContextStateBuilder
impl Debug for SpanContextStateBuilder
Auto Trait Implementations§
impl Freeze for SpanContextStateBuilder
impl RefUnwindSafe for SpanContextStateBuilder
impl Send for SpanContextStateBuilder
impl Sync for SpanContextStateBuilder
impl Unpin for SpanContextStateBuilder
impl UnwindSafe for SpanContextStateBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more