Skip to main content

CliEventParser

Trait CliEventParser 

Source
pub trait CliEventParser: Send {
    // Required methods
    fn parse_line(
        &mut self,
        line: &str,
    ) -> Result<Vec<CodingCliEvent>, ParseError>;
    fn flush(&mut self) -> Result<Vec<CodingCliEvent>, ParseError>;
}
Expand description

A stream parser owned by the harness for the lifetime of one run.

Adapters that emit NDJSON typically maintain no state and parse each line independently; adapters that emit multi-line frames can buffer in self. flush is called once at EOF.

Required Methods§

Implementors§