pub struct TraceparentCtxt<C = Empty> { /* private fields */ }
Expand description
A Ctxt
that synchronizes Traceparent
s with an underlying ambient context.
The trace context is shared by all instances of TraceparentCtxt
, and any calls to Traceparent::current
and Traceparent::push
.
Implementations§
Source§impl<C> TraceparentCtxt<C>
impl<C> TraceparentCtxt<C>
Sourcepub const fn new(inner: C) -> Self
pub const fn new(inner: C) -> Self
Wrap the given context, synchronizing any emit::SpanCtxt
with the current Traceparent
.
Trait Implementations§
Source§impl<C: Clone> Clone for TraceparentCtxt<C>
impl<C: Clone> Clone for TraceparentCtxt<C>
Source§fn clone(&self) -> TraceparentCtxt<C>
fn clone(&self) -> TraceparentCtxt<C>
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<C: Ctxt> Ctxt for TraceparentCtxt<C>
impl<C: Ctxt> Ctxt for TraceparentCtxt<C>
Source§type Current = TraceparentCtxtProps<<C as Ctxt>::Current>
type Current = TraceparentCtxtProps<<C as Ctxt>::Current>
The type of
Props
used in Ctxt::with_current
.Source§type Frame = TraceparentCtxtFrame<<C as Ctxt>::Frame>
type Frame = TraceparentCtxtFrame<<C as Ctxt>::Frame>
The type of frame returned by
Ctxt::open_root
and Ctxt::open_push
.Source§fn with_current<R, F: FnOnce(&Self::Current) -> R>(&self, with: F) -> R
fn with_current<R, F: FnOnce(&Self::Current) -> R>(&self, with: F) -> R
Access the current context. Read more
Source§fn open_root<P: Props>(&self, props: P) -> Self::Frame
fn open_root<P: Props>(&self, props: P) -> Self::Frame
Create a frame that will set the context to just the properties in
P
. Read moreSource§impl<C: Debug> Debug for TraceparentCtxt<C>
impl<C: Debug> Debug for TraceparentCtxt<C>
impl<C: Copy> Copy for TraceparentCtxt<C>
Auto Trait Implementations§
impl<C> Freeze for TraceparentCtxt<C>where
C: Freeze,
impl<C> RefUnwindSafe for TraceparentCtxt<C>where
C: RefUnwindSafe,
impl<C> Send for TraceparentCtxt<C>where
C: Send,
impl<C> Sync for TraceparentCtxt<C>where
C: Sync,
impl<C> Unpin for TraceparentCtxt<C>where
C: Unpin,
impl<C> UnwindSafe for TraceparentCtxt<C>where
C: UnwindSafe,
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