[][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.


impl HSpanContext[src]

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

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

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>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> BorrowMut<T> for T where
    T: ?Sized

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