Skip to main content

RowDecoder

Trait RowDecoder 

Source
pub trait RowDecoder {
    // Required methods
    fn header(&mut self) -> Result<Option<Vec<String>>>;
    fn next_row(&mut self) -> Result<Option<Vec<(String, LoraValue)>>>;
}
Expand description

Pull-based row decoder. Reads from a std::io::BufRead and yields completed rows one at a time. Used by native Rust callers that already have the input as a stream-like reader.

Required Methods§

Source

fn header(&mut self) -> Result<Option<Vec<String>>>

Returns the column names declared in the file header. CSV uses this; JSONL/JSON return None (every row carries its own keys).

Source

fn next_row(&mut self) -> Result<Option<Vec<(String, LoraValue)>>>

Pull the next row as a flat (name, value) vector. Returns Ok(None) once the input is exhausted.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§