pub struct TracingContext { /* private fields */ }Available on crate feature
tracing only.Expand description
Metadata used specifically for storing tracing context.
Implementations§
Source§impl TracingContext
impl TracingContext
Sourcepub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
pub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
Set the trace ID.
Sourcepub fn with_span_id(self, span_id: impl Into<String>) -> Self
pub fn with_span_id(self, span_id: impl Into<String>) -> Self
Set the span ID.
Sourcepub fn with_trace_flags(self, trace_flags: u8) -> Self
pub fn with_trace_flags(self, trace_flags: u8) -> Self
Set the trace flags.
Sourcepub fn with_trace_state(self, trace_state: impl Into<String>) -> Self
pub fn with_trace_state(self, trace_state: impl Into<String>) -> Self
Set the trace state.
Sourcepub fn trace_flags(&self) -> &Option<u8>
pub fn trace_flags(&self) -> &Option<u8>
Get the trace flags.
Sourcepub fn trace_state(&self) -> &Option<String>
pub fn trace_state(&self) -> &Option<String>
Get the trace state.
Trait Implementations§
Source§impl Clone for TracingContext
impl Clone for TracingContext
Source§impl Debug for TracingContext
impl Debug for TracingContext
Source§impl Default for TracingContext
impl Default for TracingContext
Source§impl<'de> Deserialize<'de> for TracingContext
Available on crate feature serde only.
impl<'de> Deserialize<'de> for TracingContext
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TracingContext
impl Display for TracingContext
Source§impl FromStr for TracingContext
impl FromStr for TracingContext
Source§impl Metadata for TracingContext
impl Metadata for TracingContext
Auto Trait Implementations§
impl Freeze for TracingContext
impl RefUnwindSafe for TracingContext
impl Send for TracingContext
impl Sync for TracingContext
impl Unpin for TracingContext
impl UnsafeUnpin for TracingContext
impl UnwindSafe for TracingContext
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