[][src]Struct tracing_subscriber::layer::Identity

pub struct Identity { /* fields omitted */ }

A layer that does nothing.

Methods

impl Identity[src]

pub fn new() -> Self[src]

Returns a new Identity layer.

Trait Implementations

impl<S: Subscriber> Layer<S> for Identity[src]

fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest[src]

Registers a new callsite with this layer, returning whether or not the layer is interested in being notified about the callsite, similarly to [Subscriber::register_callsite]. Read more

fn enabled(&self, metadata: &Metadata, ctx: Context<S>) -> bool[src]

Returns true if this layer is interested in a span or event with the given metadata in the current [Context], similarly to [Subscriber::enabled]. Read more

fn new_span(&self, attrs: &Attributes, id: &Id, ctx: Context<S>)[src]

Notifies this layer that a new span was constructed with the given Attributes and Id. Read more

fn on_record(&self, _span: &Id, _values: &Record, _ctx: Context<S>)[src]

Notifies this layer that a span with the given Id recorded the given values. Read more

fn on_follows_from(&self, _span: &Id, _follows: &Id, _ctx: Context<S>)[src]

Notifies this layer that a span with the ID span recorded that it follows from the span with the ID follows. Read more

fn on_event(&self, _event: &Event, _ctx: Context<S>)[src]

Notifies this layer that an event has occurred.

fn on_enter(&self, _id: &Id, _ctx: Context<S>)[src]

Notifies this layer that a span with the given ID was entered.

fn on_exit(&self, _id: &Id, _ctx: Context<S>)[src]

Notifies this layer that the span with the given ID was exited.

fn on_close(&self, _id: Id, _ctx: Context<S>)[src]

Notifies this layer that the span with the given ID has been closed.

fn on_id_change(&self, _old: &Id, _new: &Id, _ctx: Context<S>)[src]

Notifies this layer that a span ID has been cloned, and that the subscriber returned a different ID. Read more

fn and_then<L>(self, layer: L) -> Layered<L, Self, S> where
    L: Layer<S>,
    Self: Sized
[src]

Composes this layer around the given Layer, returning a Layered struct implementing Layer. Read more

fn with_subscriber(self, inner: S) -> Layered<Self, S> where
    Self: Sized
[src]

Composes this Layer with the given [Subscriber], returning a Layered struct that implements [Subscriber]. Read more

impl Clone for Identity[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Identity[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 = 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.

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]

impl<T> Erased for T[src]