Skip to main content

Pipeline

Struct Pipeline 

Source
pub struct Pipeline<S> { /* private fields */ }
Expand description

A completed execution chain that can process data.

Use Pipeline::builder to construct a new instance.

Implementations§

Source§

impl Pipeline<()>

Source

pub fn builder<I>() -> PipelineBuilder<NoOp<I>>

Starts the construction of a new pipeline.

To ensure type safety, the user must specify the initial input type: Pipeline::builder::<i32>()

Source§

impl<S> Pipeline<S>
where S: Step,

Source

pub fn run(&self, input: S::Input) -> Result<S::Output, PipelineError>

Feeds data into the start of the pipeline and returns the final result.

This method executes all stages sequentially. Execution stops upon completion or on PipelineError

Source§

impl<S> Pipeline<S>
where S: Step + 'static,

Source

pub fn into_boxed(self) -> Box<dyn Step<Input = S::Input, Output = S::Output>>

Erases the concrete type of the pipeline, returning a boxed trait object. This is useful for storing different pipelines in a single collection as long as they share the same Input and Output types. The matching types can be bypassed by creating an Enum Wrapper of known Stages.

Auto Trait Implementations§

§

impl<S> Freeze for Pipeline<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Pipeline<S>
where S: RefUnwindSafe,

§

impl<S> Send for Pipeline<S>
where S: Send,

§

impl<S> Sync for Pipeline<S>
where S: Sync,

§

impl<S> Unpin for Pipeline<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for Pipeline<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for Pipeline<S>
where S: UnwindSafe,

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.