[][src]Struct tracing_error::ErrorLayer

pub struct ErrorLayer<S, F = DefaultFields> { /* fields omitted */ }

A subscriber Layer that enables capturing SpanTraces.

Optionally, this type may be constructed with a field formatter to use when formatting the fields of each span in a trace. When no formatter is provided, the default format is used instead.

Methods

impl<S, F> ErrorLayer<S, F> where
    F: for<'writer> FormatFields<'writer> + 'static,
    S: Subscriber + for<'span> LookupSpan<'span>, 
[src]

pub fn new(format: F) -> Self[src]

Returns a new ErrorLayer with the provided field formatter.

Trait Implementations

impl<S, F: Debug> Debug for ErrorLayer<S, F>[src]

impl<S> Default for ErrorLayer<S> where
    S: Subscriber + for<'span> LookupSpan<'span>, 
[src]

impl<S, F> Layer<S> for ErrorLayer<S, F> where
    S: Subscriber + for<'span> LookupSpan<'span>,
    F: for<'writer> FormatFields<'writer> + 'static, 
[src]

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.

Auto Trait Implementations

impl<S, F> RefUnwindSafe for ErrorLayer<S, F> where
    F: RefUnwindSafe

impl<S, F> Send for ErrorLayer<S, F> where
    F: Send

impl<S, F> Sync for ErrorLayer<S, F> where
    F: Sync

impl<S, F> Unpin for ErrorLayer<S, F> where
    F: Unpin

impl<S, F> UnwindSafe for ErrorLayer<S, F> where
    F: UnwindSafe

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