Method
push_row
(
&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 |