Skip to main content

PostProcessorPipeline

Struct PostProcessorPipeline 

Source
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>

Source

pub fn new() -> Self

Create a new empty pipeline.

Source

pub fn add<P>(&mut self, processor: P)
where P: PostProcessor<Record = R, Label = L> + 'static,

Add a processor to the pipeline.

Source

pub fn with<P>(self, processor: P) -> Self
where P: PostProcessor<Record = R, Label = L> + 'static,

Add a processor and return self for chaining.

Source

pub fn process( &mut self, record: &mut R, context: &ProcessContext, ) -> SynthResult<Vec<L>>

Process a single record through all processors.

Source

pub fn process_batch( &mut self, records: &mut [R], base_context: &ProcessContext, ) -> SynthResult<Vec<L>>

Process a batch of records through all processors.

Source

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.

Source

pub fn processor_stats(&self) -> Vec<(&'static str, ProcessorStats)>

Get individual processor statistics.

Source

pub fn has_enabled_processors(&self) -> bool

Check if pipeline has any enabled processors.

Source

pub fn len(&self) -> usize

Get number of processors in the pipeline.

Source

pub fn is_empty(&self) -> bool

Check if pipeline is empty.

Source

pub fn reset_stats(&mut self)

Reset all statistics.

Trait Implementations§

Source§

impl<R, L> Default for PostProcessorPipeline<R, L>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V