Trait TrackedSpan

Source
pub trait TrackedSpan<C>
where C: Code, Self: Sized,
{ // Required methods fn track_enter(&self, func: C); fn track_debug(&self, debug: String); fn track_info(&self, info: &'static str); fn track_warn(&self, warn: &'static str); fn track_ok(&self, parsed: Self); fn track_err<E: Debug>(&self, code: C, err: &E); fn track_exit(&self); }
Expand description

This trait is implemented for an input type. It takes a tracking event and its raw data, converts if necessary and sends it to the actual tracker.

Required Methods§

Source

fn track_enter(&self, func: C)

Enter a parser function.

Source

fn track_debug(&self, debug: String)

Track some debug info.

Source

fn track_info(&self, info: &'static str)

Track some other info.

Source

fn track_warn(&self, warn: &'static str)

Track some warning.

Source

fn track_ok(&self, parsed: Self)

Calls exit_ok() on the ParseContext. You might want to use ok() instead.

Source

fn track_err<E: Debug>(&self, code: C, err: &E)

Calls exit_err() on the ParseContext. You might want to use err() instead.

Source

fn track_exit(&self)

Calls exit() on the ParseContext. You might want to use err() or ok() instead.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'s, C> TrackedSpan<C> for &'s str
where C: Code,

Source§

fn track_enter(&self, _func: C)

Source§

fn track_debug(&self, _debug: String)

Source§

fn track_info(&self, _info: &'static str)

Source§

fn track_warn(&self, _warn: &'static str)

Source§

fn track_ok(&self, _input: Self)

Source§

fn track_err<E>(&self, _func: C, _err: &E)

Source§

fn track_exit(&self)

Source§

impl<'s, C> TrackedSpan<C> for &'s [u8]
where C: Code,

Source§

fn track_enter(&self, _func: C)

Source§

fn track_debug(&self, _debug: String)

Source§

fn track_info(&self, _info: &'static str)

Source§

fn track_warn(&self, _warn: &'static str)

Source§

fn track_ok(&self, _input: Self)

Source§

fn track_err<E>(&self, _func: C, _err: &E)

Source§

fn track_exit(&self)

Source§

impl<'s, C, T> TrackedSpan<C> for LocatedSpan<T, DynTrackProvider<'s, C, T>>

Source§

fn track_enter(&self, func: C)

Source§

fn track_debug(&self, debug: String)

Source§

fn track_info(&self, info: &'static str)

Source§

fn track_warn(&self, warn: &'static str)

Source§

fn track_ok(&self, parsed: LocatedSpan<T, DynTrackProvider<'s, C, T>>)

Source§

fn track_err<E: Debug>(&self, code: C, err: &E)

Source§

fn track_exit(&self)

Source§

impl<C, T> TrackedSpan<C> for LocatedSpan<T, ()>

Source§

fn track_enter(&self, _func: C)

Source§

fn track_debug(&self, _debug: String)

Source§

fn track_info(&self, _info: &'static str)

Source§

fn track_warn(&self, _warn: &'static str)

Source§

fn track_ok(&self, _parsed: LocatedSpan<T, ()>)

Source§

fn track_err<E>(&self, _func: C, _err: &E)

Source§

fn track_exit(&self)

Implementors§