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> UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.