Trait pusherator::PusheratorBuild

source ·
pub trait PusheratorBuild {
    type ItemOut;
    type Output<Next: Pusherator<Item = Self::ItemOut>>;

    // Required method
    fn push_to<Next>(self, input: Next) -> Self::Output<Next>
       where Next: Pusherator<Item = Self::ItemOut>;

    // Provided methods
    fn map<Func, Out>(self, func: Func) -> MapBuild<Self, Func>
       where Self: Sized,
             Func: FnMut(Self::ItemOut) -> Out { ... }
    fn inspect<Func>(self, func: Func) -> InspectBuild<Self, Func>
       where Self: Sized,
             Func: FnMut(&Self::ItemOut) { ... }
    fn filter<Func>(self, func: Func) -> FilterBuild<Self, Func>
       where Self: Sized,
             Func: FnMut(&Self::ItemOut) -> bool { ... }
    fn tee<Next1>(self, next1: Next1) -> TeeBuild<Self, Next1>
       where Self: Sized,
             Self::ItemOut: Clone,
             Next1: Pusherator<Item = Self::ItemOut> { ... }
    fn unzip<Next1, Item2>(self, next1: Next1) -> UnzipBuild<Self, Next1>
       where Self: Sized + PusheratorBuild<ItemOut = (Next1::Item, Item2)>,
             Next1: Pusherator { ... }
    fn switch<Next1, Item2>(self, next1: Next1) -> SwitchBuild<Self, Next1>
       where Self: Sized + PusheratorBuild<ItemOut = Either<Next1::Item, Item2>>,
             Next1: Pusherator { ... }
    fn for_each<Func>(
        self,
        func: Func,
    ) -> Self::Output<ForEach<Func, Self::ItemOut>>
       where Self: Sized,
             Func: FnMut(Self::ItemOut) { ... }
    fn demux<Func, Nexts>(
        self,
        func: Func,
        nexts: Nexts,
    ) -> Self::Output<Demux<Func, Nexts, Self::ItemOut>>
       where Self: Sized,
             Func: FnMut(Self::ItemOut, &mut Nexts) { ... }
}

Required Associated Types§

source

type ItemOut

source

type Output<Next: Pusherator<Item = Self::ItemOut>>

Required Methods§

source

fn push_to<Next>(self, input: Next) -> Self::Output<Next>
where Next: Pusherator<Item = Self::ItemOut>,

Provided Methods§

source

fn map<Func, Out>(self, func: Func) -> MapBuild<Self, Func>
where Self: Sized, Func: FnMut(Self::ItemOut) -> Out,

source

fn inspect<Func>(self, func: Func) -> InspectBuild<Self, Func>
where Self: Sized, Func: FnMut(&Self::ItemOut),

source

fn filter<Func>(self, func: Func) -> FilterBuild<Self, Func>
where Self: Sized, Func: FnMut(&Self::ItemOut) -> bool,

source

fn tee<Next1>(self, next1: Next1) -> TeeBuild<Self, Next1>
where Self: Sized, Self::ItemOut: Clone, Next1: Pusherator<Item = Self::ItemOut>,

source

fn unzip<Next1, Item2>(self, next1: Next1) -> UnzipBuild<Self, Next1>
where Self: Sized + PusheratorBuild<ItemOut = (Next1::Item, Item2)>, Next1: Pusherator,

source

fn switch<Next1, Item2>(self, next1: Next1) -> SwitchBuild<Self, Next1>
where Self: Sized + PusheratorBuild<ItemOut = Either<Next1::Item, Item2>>, Next1: Pusherator,

source

fn for_each<Func>( self, func: Func, ) -> Self::Output<ForEach<Func, Self::ItemOut>>
where Self: Sized, Func: FnMut(Self::ItemOut),

source

fn demux<Func, Nexts>( self, func: Func, nexts: Nexts, ) -> Self::Output<Demux<Func, Nexts, Self::ItemOut>>
where Self: Sized, Func: FnMut(Self::ItemOut, &mut Nexts),

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<I> PusheratorBuild for PivotBuild<I>
where I: Iterator,

source§

type ItemOut = <I as Iterator>::Item

source§

type Output<O: Pusherator<Item = Self::ItemOut>> = Pivot<I, O>

source§

impl<Prev> PusheratorBuild for FlattenBuild<Prev>
where Prev: PusheratorBuild, Prev::ItemOut: IntoIterator,

source§

type ItemOut = <<Prev as PusheratorBuild>::ItemOut as IntoIterator>::Item

source§

type Output<Next: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<Flatten<Next, <Prev as PusheratorBuild>::ItemOut>>

source§

impl<Prev, Func> PusheratorBuild for FilterBuild<Prev, Func>
where Prev: PusheratorBuild, Func: FnMut(&Prev::ItemOut) -> bool,

source§

type ItemOut = <Prev as PusheratorBuild>::ItemOut

source§

type Output<Next: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<Filter<Next, Func>>

source§

impl<Prev, Func> PusheratorBuild for InspectBuild<Prev, Func>
where Prev: PusheratorBuild, Func: FnMut(&Prev::ItemOut),

source§

type ItemOut = <Prev as PusheratorBuild>::ItemOut

source§

type Output<Next: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<Inspect<Next, Func>>

source§

impl<Prev, Func, Out> PusheratorBuild for FilterMapBuild<Prev, Func>
where Prev: PusheratorBuild, Func: FnMut(Prev::ItemOut) -> Option<Out>,

source§

type ItemOut = Out

source§

type Output<O: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<FilterMap<O, Func, <Prev as PusheratorBuild>::ItemOut>>

source§

impl<Prev, Func, Out> PusheratorBuild for MapBuild<Prev, Func>
where Prev: PusheratorBuild, Func: FnMut(Prev::ItemOut) -> Out,

source§

type ItemOut = Out

source§

type Output<Next: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<Map<Next, Func, <Prev as PusheratorBuild>::ItemOut>>

source§

impl<Prev, Next1> PusheratorBuild for TeeBuild<Prev, Next1>
where Prev: PusheratorBuild, Next1: Pusherator<Item = Prev::ItemOut>, Prev::ItemOut: Clone,

source§

type ItemOut = <Prev as PusheratorBuild>::ItemOut

source§

type Output<Next: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<Tee<Next1, Next>>

source§

impl<Prev, Next1, Func> PusheratorBuild for PartitionBuild<Prev, Next1, Func>
where Prev: PusheratorBuild, Next1: Pusherator<Item = Prev::ItemOut>, Func: FnMut(&Prev::ItemOut) -> bool,

source§

type ItemOut = <Prev as PusheratorBuild>::ItemOut

source§

type Output<Next: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<Partition<Next1, Next, Func>>

source§

impl<Prev, Next1, Item2> PusheratorBuild for SwitchBuild<Prev, Next1>
where Prev: PusheratorBuild<ItemOut = Either<Next1::Item, Item2>>, Next1: Pusherator,

source§

type ItemOut = Item2

source§

type Output<Next: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<Switch<Next1, Next>>

source§

impl<Prev, Next1, Item2> PusheratorBuild for UnzipBuild<Prev, Next1>
where Prev: PusheratorBuild<ItemOut = (Next1::Item, Item2)>, Next1: Pusherator,

source§

type ItemOut = Item2

source§

type Output<Next: Pusherator<Item = Self::ItemOut>> = <Prev as PusheratorBuild>::Output<Unzip<Next1, Next>>

source§

impl<T> PusheratorBuild for InputBuild<T>

source§

type ItemOut = T

source§

type Output<O: Pusherator<Item = Self::ItemOut>> = O