Trait xray_lite::Context

source ·
pub trait Context {
    type Client: Client;

    // Required method
    fn enter_subsegment<N>(
        &self,
        namespace: N
    ) -> SubsegmentSession<Self::Client, N>
       where N: Namespace + Send + Sync;
}
Expand description

Context.

Required Associated Types§

source

type Client: Client

Client type.

Required Methods§

source

fn enter_subsegment<N>( &self, namespace: N ) -> SubsegmentSession<Self::Client, N>
where N: Namespace + Send + Sync,

Enters in a new subsegment.

SubsegmentSession records the end of the subsegment when it is dropped.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C> Context for SubsegmentContext<C>
where C: Client,

§

type Client = C

source§

impl<T> Context for InfallibleContext<T>
where T: Context,

§

type Client = <T as Context>::Client