pub trait TagParser: 'static {
    // Required method
    fn parse(&self, event: &Event<'_>) -> Option<Tag>;
}
Expand description

A type that can parse Tags from Tracing events.

This trait is blanket-implemented for all Fn(&tracing::Event) -> Option<Tag>, so top-level fns can be used.

See the module-level documentation for more details.

Required Methods§

source

fn parse(&self, event: &Event<'_>) -> Option<Tag>

Parse a tag from a [tracing::Event]

Implementors§

source§

impl TagParser for NoTag

source§

impl<F> TagParser for Fwhere F: 'static + Fn(&Event<'_>) -> Option<Tag>,