Drive the state machine to completion as a [`futures::Stream`] of record batches. The returned stream is fused and boxed so the caller can wrap it (for example, with an early-stopping adapter) without naming the unfold type.
(self)
| 128 | /// The returned stream is fused and boxed so the caller can wrap it (for |
| 129 | /// example, with an early-stopping adapter) without naming the unfold type. |
| 130 | pub(crate) fn into_stream(self) -> BoxStream<'static, Result<RecordBatch>> { |
| 131 | futures::stream::unfold(self, |state| async move { state.transition().await }) |
| 132 | .fuse() |
| 133 | .boxed() |
| 134 | } |
| 135 | |
| 136 | /// Advances the decoder state machine until the next [`RecordBatch`] is |
| 137 | /// produced, the file is fully consumed, or an error occurs. |
no test coverage detected