pub trait FormatSpan: 'static {
    // Required methods
    fn find_details<'ext>(&self, ext: &'ext Extensions<'_>) -> Option<&'ext str>;
    fn add_details(&self, ext: &mut ExtensionsMut<'_>, attrs: &Attributes<'_>);
    fn record_values(&self, ext: &mut ExtensionsMut<'_>, values: &Record<'_>);
}
Expand description

Determine what additional information will be attached to the performance events.

Required Methods§

source

fn find_details<'ext>(&self, ext: &'ext Extensions<'_>) -> Option<&'ext str>

Find the details in the extensions of a span that will be recorded with the event.

source

fn add_details(&self, ext: &mut ExtensionsMut<'_>, attrs: &Attributes<'_>)

Called when a span is constructed, with its initial attributes.

This method should insert, for later consumption in Self::find_details, a description of the details.

source

fn record_values(&self, ext: &mut ExtensionsMut<'_>, values: &Record<'_>)

Called when a span records some values.

This method should modify, for later consumption in Self::find_details, the description of the details.

Implementations on Foreign Types§

source§

impl FormatSpan for ()

source§

fn find_details<'ext>(&self, _: &'ext Extensions<'_>) -> Option<&'ext str>

source§

fn add_details(&self, _: &mut ExtensionsMut<'_>, _: &Attributes<'_>)

source§

fn record_values(&self, _: &mut ExtensionsMut<'_>, _: &Record<'_>)

Implementors§

source§

impl<N> FormatSpan for FormatSpanFromFields<N>where N: 'static + for<'writer> FormatFields<'writer>,