[][src]Struct rustracing::span::SpanHandle

pub struct SpanHandle<T>(_);

Immutable handle of Span.

Methods

impl<T> SpanHandle<T>[src]

pub fn is_sampled(&self) -> bool[src]

Returns true if this span is sampled (i.e., being traced).

pub fn context(&self) -> Option<&SpanContext<T>>[src]

Returns the context of this span.

pub fn get_baggage_item(&self, name: &str) -> Option<&BaggageItem>[src]

Gets the baggage item that has the name name.

pub fn child<N, F>(&self, operation_name: N, f: F) -> Span<T> where
    N: Into<Cow<'static, str>>,
    T: Clone,
    F: FnOnce(StartSpanOptions<AllSampler, T>) -> Span<T>, 
[src]

Starts a ChildOf span if this span is sampled.

pub fn follower<N, F>(&self, operation_name: N, f: F) -> Span<T> where
    N: Into<Cow<'static, str>>,
    T: Clone,
    F: FnOnce(StartSpanOptions<AllSampler, T>) -> Span<T>, 
[src]

Starts a FollowsFrom span if this span is sampled.

Trait Implementations

impl<T: Clone> Clone for SpanHandle<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for SpanHandle<T>[src]

Auto Trait Implementations

impl<T> Unpin for SpanHandle<T> where
    T: Unpin

impl<T> Send for SpanHandle<T> where
    T: Send

impl<T> Sync for SpanHandle<T> where
    T: Send + Sync

impl<T> RefUnwindSafe for SpanHandle<T> where
    T: RefUnwindSafe

impl<T> UnwindSafe for SpanHandle<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]