Skip to main content

DataBatchQuery

Trait DataBatchQuery 

Source
pub trait DataBatchQuery: Send {
    // Required method
    fn next_batch(&mut self) -> Result<Option<DataBatch>>;

    // Provided method
    fn reset(&mut self) -> Result<bool> { ... }
}
Expand description

Streaming query session that yields ordered [DataBatch] chunks.

Required Methods§

Source

fn next_batch(&mut self) -> Result<Option<DataBatch>>

Returns the next typed batch, or None after the session is exhausted.

§Errors

Returns an error if the underlying page source or typed conversion fails.

Provided Methods§

Source

fn reset(&mut self) -> Result<bool>

Resets the session when the backend supports replaying its source.

§Errors

Returns an error if the backend cannot reset its source state.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> DataBatchQuery for TypedDataBatchSession<T>
where T: IntoDataBatch + HasTsInit + Send,