pub struct PostProcessorPipeline<R, L> { /* private fields */ }Expand description
A pipeline of post-processors applied in sequence.
Implementations§
Source§impl<R, L> PostProcessorPipeline<R, L>
impl<R, L> PostProcessorPipeline<R, L>
Sourcepub fn add<P>(&mut self, processor: P)where
P: PostProcessor<Record = R, Label = L> + 'static,
pub fn add<P>(&mut self, processor: P)where
P: PostProcessor<Record = R, Label = L> + 'static,
Add a processor to the pipeline.
Sourcepub fn with<P>(self, processor: P) -> Selfwhere
P: PostProcessor<Record = R, Label = L> + 'static,
pub fn with<P>(self, processor: P) -> Selfwhere
P: PostProcessor<Record = R, Label = L> + 'static,
Add a processor and return self for chaining.
Sourcepub fn process(
&mut self,
record: &mut R,
context: &ProcessContext,
) -> SynthResult<Vec<L>>
pub fn process( &mut self, record: &mut R, context: &ProcessContext, ) -> SynthResult<Vec<L>>
Process a single record through all processors.
Sourcepub fn process_batch(
&mut self,
records: &mut [R],
base_context: &ProcessContext,
) -> SynthResult<Vec<L>>
pub fn process_batch( &mut self, records: &mut [R], base_context: &ProcessContext, ) -> SynthResult<Vec<L>>
Process a batch of records through all processors.
Sourcepub fn stats(&self) -> ProcessorStats
pub fn stats(&self) -> ProcessorStats
Get aggregate statistics for the pipeline.
Returns the pipeline’s own stats tracking records processed through
the entire pipeline. Use processor_stats() to get individual
processor statistics.
Sourcepub fn processor_stats(&self) -> Vec<(&'static str, ProcessorStats)>
pub fn processor_stats(&self) -> Vec<(&'static str, ProcessorStats)>
Get individual processor statistics.
Sourcepub fn has_enabled_processors(&self) -> bool
pub fn has_enabled_processors(&self) -> bool
Check if pipeline has any enabled processors.
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset all statistics.
Trait Implementations§
Auto Trait Implementations§
impl<R, L> Freeze for PostProcessorPipeline<R, L>
impl<R, L> !RefUnwindSafe for PostProcessorPipeline<R, L>
impl<R, L> Send for PostProcessorPipeline<R, L>
impl<R, L> Sync for PostProcessorPipeline<R, L>
impl<R, L> Unpin for PostProcessorPipeline<R, L>
impl<R, L> !UnwindSafe for PostProcessorPipeline<R, L>
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