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>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SpanHandle<T>
impl<T> !UnwindSafe for SpanHandle<T>
impl<T> Freeze for SpanHandle<T>
impl<T> Send for SpanHandle<T>
impl<T> Sync for SpanHandle<T>
impl<T> Unpin for SpanHandle<T>
impl<T> UnsafeUnpin for SpanHandle<T>
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