Trait kparse::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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'s, C> TrackedSpan<C> for &'s strwhere 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>>where C: Code, T: Clone + Debug + AsBytes + InputTake + InputLength,

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, ()>where T: Clone + Debug + InputTake + InputLength + AsBytes, 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, _parsed: LocatedSpan<T, ()>)

source§

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

source§

fn track_exit(&self)

Implementors§