Skip to main content

Source

Trait Source 

Source
pub trait Source: Send + Sync {
    // Required methods
    fn next_chunk(
        &mut self,
        chunk_size: usize,
    ) -> Result<Option<DataChunk>, OperatorError>;
    fn reset(&mut self);
    fn name(&self) -> &'static str;
}
Expand description

Source of data chunks for a pipeline.

Sources produce chunks of data that flow through the pipeline.

Required Methods§

Source

fn next_chunk( &mut self, chunk_size: usize, ) -> Result<Option<DataChunk>, OperatorError>

Produce the next chunk of data.

Returns Ok(Some(chunk)) if data is available, Ok(None) if exhausted.

Source

fn reset(&mut self)

Reset the source to its initial state.

Source

fn name(&self) -> &'static str

Name of this source for debugging.

Implementors§