pub struct SpanHandle<T>(/* private fields */);Expand description
Immutable handle of Span.
Implementations§
Source§impl<T> SpanHandle<T>
impl<T> SpanHandle<T>
Sourcepub fn is_sampled(&self) -> bool
pub fn is_sampled(&self) -> bool
Returns true if this span is sampled (i.e., being traced).
Sourcepub fn context(&self) -> Option<&SpanContext<T>>
pub fn context(&self) -> Option<&SpanContext<T>>
Returns the context of this span.
Sourcepub fn get_baggage_item(&self, name: &str) -> Option<&BaggageItem>
pub fn get_baggage_item(&self, name: &str) -> Option<&BaggageItem>
Gets the baggage item that has the name name.
Trait Implementations§
Source§impl<T: Clone> Clone for SpanHandle<T>
impl<T: Clone> Clone for SpanHandle<T>
Source§fn clone(&self) -> SpanHandle<T>
fn clone(&self) -> SpanHandle<T>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<T> Freeze for SpanHandle<T>where
T: Freeze,
impl<T> RefUnwindSafe for SpanHandle<T>where
T: RefUnwindSafe,
impl<T> Send for SpanHandle<T>where
T: Send,
impl<T> Sync for SpanHandle<T>
impl<T> Unpin for SpanHandle<T>where
T: Unpin,
impl<T> UnwindSafe for SpanHandle<T>where
T: 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