[][src]Struct tracing_subscriber::Registry

pub struct Registry { /* fields omitted */ }
This is supported on feature="registry" only.

A shared, reusable store for spans.

A Registry is a Subscriber around which multiple Layers implementing various behaviors may be added. Unlike other types implementing Subscriber Registry does not actually record traces itself: instead, it collects and stores span data that is exposed to any Layers wrapping it through implementations of the LookupSpan trait. The Registry is responsible for storing span metadata, recording relationships between spans, and tracking which spans are active and whicb are closed. In addition, it provides a mechanism for Layers to store user-defined per-span data, called extensions, in the registry. This allows Layer-specific data to benefit from the Registry's high-performance concurrent storage.

This registry is implemented using a lock-free sharded slab, and is highly optimized for concurrent access.

Trait Implementations

impl Debug for Registry[src]

impl Default for Registry[src]

impl<'a> LookupSpan<'a> for Registry[src]

type Data = Data<'a>

The type of span data stored in this registry.

impl Subscriber for Registry[src]

fn record(&self, _: &Id, _: &Record)[src]

This is intentionally not implemented, as recording fields on a span is the responsibility of layers atop of this registry.

fn event(&self, _: &Event)[src]

This is intentionally not implemented, as recording events is the responsibility of layers atop of this registry.

fn try_close(&self, id: Id) -> bool[src]

Decrements the reference count of the span with the given id, and removes the span if it is zero.

The allocated span slot will be reused when a new span is created.

Auto Trait Implementations

impl !RefUnwindSafe for Registry

impl Send for Registry

impl Sync for Registry

impl Unpin for Registry

impl !UnwindSafe for Registry

Blanket Implementations

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

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

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

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

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

impl<S> SubscriberExt for S where
    S: Subscriber
[src]

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.