oxirs_arq/streaming/
emptystream_traits.rs1use crate::algebra::Solution;
12use anyhow::Result;
13
14use super::functions::DataStream;
15use super::types::{EmptyStream, StreamStats};
16
17impl DataStream for EmptyStream {
18 fn next_batch(&mut self) -> Result<Option<Vec<Solution>>> {
19 if self.exhausted {
20 Ok(None)
21 } else {
22 self.exhausted = true;
23 Ok(Some(vec![]))
24 }
25 }
26 fn has_more(&self) -> bool {
27 !self.exhausted
28 }
29 fn estimated_size(&self) -> Option<usize> {
30 Some(0)
31 }
32 fn reset(&mut self) -> Result<()> {
33 self.exhausted = false;
34 Ok(())
35 }
36 fn get_stats(&self) -> StreamStats {
37 StreamStats::default()
38 }
39}