Skip to main content

PipeExt

Trait PipeExt 

Source
pub trait PipeExt: Pipe + Sized {
    // Provided methods
    fn and_then<Next>(self, next: Next) -> AndThen<Self, Next>
       where Next: Pipe<In = Self::Out>,
             Next::Err: From<Self::Err> { ... }
    fn filter<Pred>(self, predicate: Pred) -> AndThen<Pred, Self>
       where Pred: Pipe<Out = Self::In>,
             Self::Err: From<Pred::Err> { ... }
    fn fanout(self, other: Self) -> FanOut<Self, AllOrNothing>
       where Self: Clone,
             Self::In: Clone { ... }
    fn fanin<Strategy>(
        self,
        other: Self,
        strategy: Strategy,
    ) -> FanIn<Self, Strategy, 2>
       where Self: UnpinPipe<In = (), Err = Exhausted> + DropSafe,
             Strategy: FanInStrategy { ... }
}
Expand description

Fluent sugar over the root Pipe. See the module doc for what each method builds.

Provided Methods§

Source

fn and_then<Next>(self, next: Next) -> AndThen<Self, Next>
where Next: Pipe<In = Self::Out>, Next::Err: From<Self::Err>,

self.and_then(next) is AndThen::new(self, next) — reads left-to-right at the call site.

Source

fn filter<Pred>(self, predicate: Pred) -> AndThen<Pred, Self>
where Pred: Pipe<Out = Self::In>, Self::Err: From<Pred::Err>,

Gate self behind predicate.

Source

fn fanout(self, other: Self) -> FanOut<Self, AllOrNothing>
where Self: Clone, Self::In: Clone,

Broadcast to self and other, all-or-nothing.

Source

fn fanin<Strategy>( self, other: Self, strategy: Strategy, ) -> FanIn<Self, Strategy, 2>
where Self: UnpinPipe<In = (), Err = Exhausted> + DropSafe, Strategy: FanInStrategy,

Merge self and other into a two-source FanIn. FanIn sources are UnpinPipe-shaped (In = (), Err = Exhausted), hence the extra bound.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P: Pipe> PipeExt for P