Skip to main content

Pipeline

Struct Pipeline 

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

A sequence of stages, itself a Stage. Wired and driven by start (at the top level) or by a parent pipeline’s run (when nested).

Implementations§

Source§

impl Pipeline

Source

pub fn start(self) -> (PipelineEnds, DriverFuture)

Wire fresh external PipelineEnds and return them with the driving future. The caller drives the future (e.g. block_on) and uses the ends to feed the head and read the tail.

Trait Implementations§

Source§

impl Processor for Pipeline

Source§

type Effect = ()

The command vocabulary this stage can emit; plain data, no I/O.
Source§

fn decide_data(&mut self, _frame: &DataFrame) -> Decision<()>

Maps an incoming data frame to a disposition and zero or more effects. Read more
Source§

fn decide_system( &mut self, _dir: Direction, _frame: &SystemFrame, ) -> Decision<()>

Maps an incoming system frame to a disposition and zero or more effects. Read more
Source§

impl Stage for Pipeline

Source§

fn run<'async_trait>( self: Box<Self>, inbound: Inbound, out: Outbound, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,

Wire the children between inbound and out and drive every child’s run cooperatively as one future via FuturesUnordered.

Source§

fn perform<'life0, 'life1, 'async_trait>( &'life0 self, _effect: (), _out: &'life1 Outbound, ) -> Pin<Box<dyn Future<Output = Result<(), StageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Interpret one effect emitted by decide_* and carry out its I/O, sending any resulting frames through out. Read more

Auto Trait Implementations§

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> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync + ?Sized,

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.