pub fn decode_next_batch(buf: &mut Bytes) -> Result<Option<RecordBatch>>Expand description
Decode the next complete batch from buf, when one is present.
Returns Ok(None) when the buffer is empty or ends in a truncated trailing
batch (fetch responses may cut the last batch short) — an error only if a
batch is malformed, not just incomplete. Lets a consumer decode a fetched
blob one batch at a time instead of materializing every record up front.