MCPcopy Create free account
hub / github.com/PerroEngine/Perro / push_row

Method push_row

perro_source/core/perro_csv/src/lib.rs:335–349  ·  view source on GitHub ↗
(
        &mut self,
        row: impl IntoIterator<Item = impl Into<String>>,
    )

Source from the content-addressed store, hash-verified

333 for record in reader.records() {
334 let record = record.map_err(|err| format!("failed to parse csv row: {err}"))?;
335 out.rows.push(
336 record
337 .iter()
338 .map(|value| value.trim().to_string())
339 .collect(),
340 );
341 }
342 Ok(out)
343 }
344
345 pub fn from_static(table: &Csv) -> Self {
346 let headers = table
347 .headers
348 .iter()
349 .map(|cell| cell.text.to_string())
350 .collect();
351 let rows = table
352 .rows

Callers 2

csv_saves_buf_to_diskFunction · 0.80

Calls 2

lenMethod · 0.45
pushMethod · 0.45

Tested by 2

csv_saves_buf_to_diskFunction · 0.64