[][src]Struct holochain_tracing::SpanContext

pub struct SpanContext(pub SpanContext);

An OpenTracing SpanContext is used to send span info across a process boundary. This is a simple wrapper around that, again with some helper functions.

Methods

impl HSpanContext[src]

pub fn follower<S: Into<Cow<'static, str>>>(
    &self,
    tracer: &Tracer,
    operation_name: S
) -> HSpan
[src]

Create a follower RjSpan from this SpanContext NB: there is intentionally no method to create a child span from a context, since it's assumed that all inter-process points of a trace are async and the parent span will have ended before this one does

pub fn follower_<'a, N: Into<Cow<'static, str>>, F>(
    &'a self,
    tracer: &Tracer,
    operation_name: N,
    f: F
) -> HSpan where
    F: FnOnce(StartSpanOptions<BoxSampler<SpanContextState>, SpanContextState>) -> RjSpan
[src]

pub fn encode(&self) -> Result<EncodedSpanContext>[src]

Serialize to binary format for packing into a IPC message

pub fn decode(enc: &EncodedSpanContext) -> Result<Self>[src]

Deserialize from binary format

pub fn wrap<T>(self, data: T) -> SpanWrap<T>[src]

Wrap this context in a SpanWrap along with some user data

Trait Implementations

impl Clone for HSpanContext[src]

impl Debug for HSpanContext[src]

Auto Trait Implementations

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 = !

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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