[−][src]Struct zipkin::TraceContext
A TraceContext
represents a distributed trace request.
It consists of a trace ID, the ID of the parent span, the ID of the context's span, and flags dealing with the sampling of the span.
The trace context is sent to remote services on requests. For example, it is included in a standard set of headers in HTTP requests.
Implementations
impl TraceContext
[src]
pub fn builder() -> Builder
[src]
Returns a builder used to construct a TraceContext
.
pub fn trace_id(&self) -> TraceId
[src]
Returns the ID of the trace associated with this context.
pub fn parent_id(&self) -> Option<SpanId>
[src]
Returns the ID of the parent of the span associated with this context.
pub fn span_id(&self) -> SpanId
[src]
Returns the ID of the span associated with this context.
pub fn sampling_flags(&self) -> SamplingFlags
[src]
Returns the sampling flags associated with this context.
pub fn sampled(&self) -> Option<bool>
[src]
Determines if sampling has been requested for this context.
A value of None
indicates that the service working in the context is
responsible for determining if it should be sampled.
pub fn debug(&self) -> bool
[src]
Determines if this context is in debug mode.
Debug contexts should always be sampled, regardless of the value of
sampled()
.
Trait Implementations
impl Clone for TraceContext
[src]
pub fn clone(&self) -> TraceContext
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for TraceContext
[src]
impl Debug for TraceContext
[src]
impl Eq for TraceContext
[src]
impl From<TraceContext> for Builder
[src]
pub fn from(c: TraceContext) -> Builder
[src]
impl PartialEq<TraceContext> for TraceContext
[src]
pub fn eq(&self, other: &TraceContext) -> bool
[src]
pub fn ne(&self, other: &TraceContext) -> bool
[src]
impl StructuralEq for TraceContext
[src]
impl StructuralPartialEq for TraceContext
[src]
Auto Trait Implementations
impl RefUnwindSafe for TraceContext
[src]
impl Send for TraceContext
[src]
impl Sync for TraceContext
[src]
impl Unpin for TraceContext
[src]
impl UnwindSafe for TraceContext
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,