structured/record.rs
1//! Definitions to help handling CSV data as a set of records.
2
3use std::sync::Arc;
4
5use arrow::array::Array;
6
7/// A batch of multi-field data.
8#[derive(Clone)]
9pub struct Batch {
10 columns: Vec<Arc<dyn Array>>,
11}
12
13impl Batch {
14 #[must_use]
15 pub fn new(columns: Vec<Arc<dyn Array>>) -> Self {
16 Self { columns }
17 }
18
19 #[must_use]
20 pub fn columns(&self) -> &[Arc<dyn Array>] {
21 self.columns.as_slice()
22 }
23}