pub struct PipelineExecutor { /* private fields */ }Expand description
Executes a pipeline of stages on a stream of data.
Implementations§
Source§impl PipelineExecutor
impl PipelineExecutor
Sourcepub async fn new(
config: PipelineConfig,
stages: Vec<Arc<dyn PipelineStage>>,
) -> Result<Self>
pub async fn new( config: PipelineConfig, stages: Vec<Arc<dyn PipelineStage>>, ) -> Result<Self>
Create a new pipeline executor.
Sourcepub async fn process(&self, data: Bytes) -> Result<StageResult>
pub async fn process(&self, data: Bytes) -> Result<StageResult>
Process a single item through all pipeline stages.
Sourcepub async fn process_batch(&self, items: Vec<Bytes>) -> Result<ExecutionStats>
pub async fn process_batch(&self, items: Vec<Bytes>) -> Result<ExecutionStats>
Process multiple items and return aggregated statistics.
Sourcepub fn config(&self) -> &PipelineConfig
pub fn config(&self) -> &PipelineConfig
Get the pipeline configuration.
Sourcepub fn stage_count(&self) -> usize
pub fn stage_count(&self) -> usize
Get the number of stages.
Auto Trait Implementations§
impl !RefUnwindSafe for PipelineExecutor
impl !UnwindSafe for PipelineExecutor
impl Freeze for PipelineExecutor
impl Send for PipelineExecutor
impl Sync for PipelineExecutor
impl Unpin for PipelineExecutor
impl UnsafeUnpin for PipelineExecutor
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