pub trait ChunkSource: Send {
// Required method
fn next_chunk(&mut self) -> Result<Option<Bytes>>;
}Expand description
Source of Arrow IPC byte chunks for streaming decode.
Implement this for any blocking chunk producer. The canonical use is
wrapping a gRPC chunk stream so ArrowRowset can decode record batches
lazily, keeping peak memory bounded by roughly one chunk regardless of
total result size.
Returning Ok(None) signals end-of-stream.
Required Methods§
Sourcefn next_chunk(&mut self) -> Result<Option<Bytes>>
fn next_chunk(&mut self) -> Result<Option<Bytes>>
Returns the next Arrow IPC byte chunk, or Ok(None) once the source
is exhausted. Subsequent calls after Ok(None) should keep
returning Ok(None).
§Errors
Implementations return whatever transport error the underlying
source produces (typically Error::Client from a gRPC stream or
Error::Io on network failures).