Skip to main content

parse_table

Function parse_table 

Source
pub fn parse_table(
    rows: Vec<Vec<String>>,
    layout: &TableLayout,
    path: &Path,
    options: &Options,
) -> Result<Value>
Expand description

The generic table stage: interpret a plain row table under an explicit TableLayout — &TableLayout::Kv for key,value[,format] rows (what the csv format feeds by default), &TableLayout::Db for a record grid, or a CustomLayout callback. Public so custom table-shaped formats (markdown tables, …) and custom layouts can lower their input into rows and reuse it; path labels errors. The layout is always passed — there is deliberately no defaulting variant.