Skip to main content

BatchReader

Trait BatchReader 

Source
pub trait BatchReader {
    // Required methods
    fn push(&mut self, piece: &[u8]) -> Result<()>;
    fn take_batch(&mut self) -> PolarsResult<Option<DataFrame>>;
    fn finish(&mut self) -> Result<DataFrame>;
}
Expand description

A text format’s reader: it takes the file a piece at a time and hands back its rows a batch at a time, keeping no more of the file than the batch.

Required Methods§

Source

fn push(&mut self, piece: &[u8]) -> Result<()>

Source

fn take_batch(&mut self) -> PolarsResult<Option<DataFrame>>

The rows ready, once a batch’s worth is.

Source

fn finish(&mut self) -> Result<DataFrame>

The rows left at the end of the file.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§