Skip to main content

JsonLinesParser

Trait JsonLinesParser 

Source
pub(crate) trait JsonLinesParser<T>: Send + 'static {
    // Required methods
    fn from_line(&self, line: &str, error: &mut String) -> Option<T>;
    fn from_eof(&self) -> Option<T>;
}
Expand description

This trait abstracts parsing one line of JSON output into a Rust data type.

This is useful for cargo check output, cargo test output, as well as custom discover commands.

Required Methods§

Source

fn from_line(&self, line: &str, error: &mut String) -> Option<T>

Source

fn from_eof(&self) -> Option<T>

Implementors§