[−][src]Struct tracing_error::ErrorLayer
A subscriber Layer
that enables capturing SpanTrace
s.
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]
F: for<'writer> FormatFields<'writer> + 'static,
S: Subscriber + for<'span> LookupSpan<'span>,
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]
S: Subscriber + for<'span> LookupSpan<'span>,
impl<S, F> Layer<S> for ErrorLayer<S, F> where
S: Subscriber + for<'span> LookupSpan<'span>,
F: for<'writer> FormatFields<'writer> + 'static,
[src]
S: Subscriber + for<'span> LookupSpan<'span>,
F: for<'writer> FormatFields<'writer> + 'static,
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
.
unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>
[src]
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
[src]
fn enabled(&self, metadata: &Metadata, ctx: Context<S>) -> bool
[src]
fn on_record(&self, _span: &Id, _values: &Record, _ctx: Context<S>)
[src]
fn on_follows_from(&self, _span: &Id, _follows: &Id, _ctx: Context<S>)
[src]
fn on_event(&self, _event: &Event, _ctx: Context<S>)
[src]
fn on_enter(&self, _id: &Id, _ctx: Context<S>)
[src]
fn on_exit(&self, _id: &Id, _ctx: Context<S>)
[src]
fn on_close(&self, _id: Id, _ctx: Context<S>)
[src]
fn on_id_change(&self, _old: &Id, _new: &Id, _ctx: Context<S>)
[src]
fn and_then<L>(self, layer: L) -> Layered<L, Self, S> where
L: Layer<S>,
[src]
L: Layer<S>,
fn with_subscriber(self, inner: S) -> Layered<Self, S, S>
[src]
Auto Trait Implementations
impl<S, F> RefUnwindSafe for ErrorLayer<S, F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<S, F> Send for ErrorLayer<S, F> where
F: Send,
F: Send,
impl<S, F> Sync for ErrorLayer<S, F> where
F: Sync,
F: Sync,
impl<S, F> Unpin for ErrorLayer<S, F> where
F: Unpin,
F: Unpin,
impl<S, F> UnwindSafe for ErrorLayer<S, F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,