oxbow 0.7.0

Read conventional genomic file formats as data frames and more via Apache Arrow.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use arrow::datatypes::SchemaRef;
use arrow::error::ArrowError;
use arrow::record_batch::RecordBatch;

/// A builder for Arrow record batches.
pub trait RecordBatchBuilder {
    /// Returns the Arrow schema for the record batches produced by this builder.
    fn schema(&self) -> SchemaRef;

    /// Finalizes the current batch and returns it, resetting the builder for the next batch.
    fn finish(&mut self) -> Result<RecordBatch, ArrowError>;
}

/// Push a record into a batch builder.
pub trait Push<T> {
    fn push(&mut self, record: T) -> crate::Result<()>;
}