pub struct ResultSet {
pub filename: String,
pub extension: String,
pub selected: Option<Vec<String>>,
pub sheets: Vec<String>,
pub keys: Vec<String>,
pub num_rows: usize,
pub data: SpreadData,
pub out_ref: Option<String>,
pub opts: OptionSet,
pub header_row_index: Option<usize>,
pub body_start_index: usize,
}Fields§
§filename: String§extension: String§selected: Option<Vec<String>>§sheets: Vec<String>§keys: Vec<String>§num_rows: usize§data: SpreadData§out_ref: Option<String>§opts: OptionSet§header_row_index: Option<usize>0-based index of the header row actually used, resolved at read time – whether
from an explicit OptionSet.header_row override or auto-detection. None when no
row was captured as a header at all (--omit-header, or when auto-detection found
no confident header in the sample) – distinct from opts.header_row, which only
ever reflects an explicit override and stays None whenever detection ran instead.
body_start_index: usize0-based index of the first data row actually used, resolved at read time – whether
from an explicit OptionSet.data_row_index override or auto-detection. Always
concrete: a file always starts reading data somewhere, unlike the header row.
Implementations§
Source§impl ResultSet
impl ResultSet
Sourcepub fn new(
info: &WorkbookInfo,
keys: &[String],
data_set: DataSet,
opts: &OptionSet,
out_ref: Option<&str>,
header_row_index: Option<usize>,
body_start_index: usize,
) -> Self
pub fn new( info: &WorkbookInfo, keys: &[String], data_set: DataSet, opts: &OptionSet, out_ref: Option<&str>, header_row_index: Option<usize>, body_start_index: usize, ) -> Self
Instantiate with Core workbook info, header keys, data set and optional output reference.
header_row_index/body_start_index are the resolved 0-based row indices actually
used for this read – see the field docs on ResultSet for why these differ from
opts.header_row/opts.data_row_index.
pub fn from_multiple( sheets: &[SheetDataSet], info: &WorkbookInfo, opts: &OptionSet, ) -> Self
pub fn multimode(&self) -> bool
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
Full result set as JSON with criteria, options and data in synchronous mode
Sourcepub fn to_output_lines(&self, json_lines: bool) -> Vec<String>
pub fn to_output_lines(&self, json_lines: bool) -> Vec<String>
Full result set as CLI-friendly lines