pub struct StreamExecutor { /* private fields */ }Expand description
Processes a stream of chunks through a sequence of fitted filters.
Each filter’s StreamMode defines its contract:
- FixedState: each chunk processed independently, cacheable per chunk
- Evolving: state mutates with each chunk, periodic checkpoints
- Barrier: accumulates all chunks, processes as batch on flush
Implementations§
Source§impl StreamExecutor
impl StreamExecutor
pub fn new(filters: Vec<FittedFilter>) -> Self
pub fn with_cache(self, cache: Arc<dyn CacheStore>) -> Self
Sourcepub fn process_chunk(&mut self, chunk: Value) -> Result<Option<Value>>
pub fn process_chunk(&mut self, chunk: Value) -> Result<Option<Value>>
Process a single chunk through the pipeline. Returns the output chunk, or None if a Barrier filter is still accumulating.
Sourcepub fn flush(&mut self) -> Result<Option<Value>>
pub fn flush(&mut self) -> Result<Option<Value>>
Flush barrier filters and process remaining data as batch.
Sourcepub fn process_all(&mut self, chunks: Vec<Value>) -> Result<Vec<Value>>
pub fn process_all(&mut self, chunks: Vec<Value>) -> Result<Vec<Value>>
Process multiple chunks and collect outputs.
Sourcepub fn chunks_processed(&self) -> usize
pub fn chunks_processed(&self) -> usize
Number of chunks processed so far.
Auto Trait Implementations§
impl Freeze for StreamExecutor
impl !RefUnwindSafe for StreamExecutor
impl Send for StreamExecutor
impl Sync for StreamExecutor
impl Unpin for StreamExecutor
impl UnsafeUnpin for StreamExecutor
impl !UnwindSafe for StreamExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more