pub trait TracingContext {
    type DurationScope;

    // Required method
    fn duration(&self, name: &'static CStr) -> Self::DurationScope;
}
Expand description

A context for emitting tracing data.

Required Associated Types§

source

type DurationScope

The scope of a trace duration.

Its lifetime corresponds to the beginning and end of the duration.

Required Methods§

source

fn duration(&self, name: &'static CStr) -> Self::DurationScope

Writes a duration event which ends when the returned scope is dropped.

Durations describe work which is happening synchronously on one thread. Care should be taken to avoid a duration’s scope spanning an await point in asynchronous code.

Implementors§

source§

impl TracingContext for FakeTracingCtx

source§

impl<Id, Event: Debug, State, FrameMeta> TracingContext for FakeBindingsCtx<Id, Event, State, FrameMeta>