From 349f655e8193d52ab0b9a93df7bec54d329b9540 Mon Sep 17 00:00:00 2001 From: Dominik Werder Date: Tue, 18 Feb 2025 15:57:57 +0100 Subject: [PATCH] Add separate return type --- src/timebin.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/timebin.rs b/src/timebin.rs index 2621a13..b09c815 100644 --- a/src/timebin.rs +++ b/src/timebin.rs @@ -136,9 +136,21 @@ pub trait BinningggBinnerDyn: fmt::Debug + Send { fn input_done_range_open(&mut self) -> Result<(), BinningggError>; } +#[must_use] +pub enum IngestReport { + ConsumedAll, + ConsumedPart(usize), +} + +impl IngestReport { + pub fn ingest_again(&self) -> bool { + todo!() + } +} + pub trait BinnedEventsTimeweightTrait: fmt::Debug + Send { fn cnt_zero_enable(&mut self); - fn ingest(&mut self, evs: &EventsBoxed) -> Result<(), BinningggError>; + fn ingest(&mut self, evs: &EventsBoxed) -> Result; fn input_done_range_final(&mut self) -> Result<(), BinningggError>; fn input_done_range_open(&mut self) -> Result<(), BinningggError>; fn output(&mut self) -> Result, BinningggError>;