Skip to main content

Pull

Trait Pull 

Source
pub trait Pull {
    type Ctx<'ctx>: Context<'ctx>;
    type Item;
    type Meta: Copy;
    type CanPend: Toggle;
    type CanEnd: Toggle;

Show 28 methods // Required methods fn pull( self: Pin<&mut Self>, ctx: &mut Self::Ctx<'_>, ) -> PullStep<Self::Item, Self::Meta, Self::CanPend, Self::CanEnd>; fn size_hint(&self) -> (usize, Option<usize>); // Provided methods fn by_ref(&mut self) -> &mut Self { ... } fn chain<U>(self, other: U) -> Chain<Self, U> where Self: Sized + FusedPull<CanEnd = Yes>, U: Pull<Item = Self::Item, Meta = Self::Meta> { ... } fn enumerate(self) -> Enumerate<Self> where Self: Sized { ... } fn filter<P>(self, predicate: P) -> Filter<Self, P> where Self: Sized, P: FnMut(&Self::Item) -> bool { ... } fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where Self: Sized, F: FnMut(Self::Item) -> Option<B> { ... } fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F, U::IntoIter, Self::Meta> where Self: Sized, F: FnMut(Self::Item) -> U, U: IntoIterator { ... } fn flatten( self, ) -> Flatten<Self, <Self::Item as IntoIterator>::IntoIter, Self::Meta> where Self: Sized, Self::Item: IntoIterator { ... } fn flatten_stream(self) -> FlattenStream<Self, Self::Item, Self::Meta> where Self: Sized, Self::Item: Stream { ... } fn for_each<F>(self, f: F) -> ForEach<Self, F> where Self: Sized, F: FnMut(Self::Item) { ... } fn collect<C>(self) -> Collect<Self, C> where Self: Sized, C: Default + Extend<Self::Item> { ... } fn fuse( self, ) -> impl for<'ctx> FusedPull<Ctx<'ctx> = Self::Ctx<'ctx>, Item = Self::Item, Meta = Self::Meta, CanPend = Self::CanPend, CanEnd = Self::CanEnd> where Self: Sized { ... } fn inspect<F>(self, f: F) -> Inspect<Self, F> where Self: Sized, F: FnMut(&Self::Item) { ... } fn map<B, F>(self, f: F) -> Map<Self, F> where Self: Sized, F: FnMut(Self::Item) -> B { ... } fn send_sink<Push>(self, push: Push) -> SendSink<Self, Push> where Self: Sized, Push: Sink<Self::Item> { ... } fn send_push<Psh>(self, push: Psh) -> SendPush<Self, Psh> where Self: Sized, Psh: Push<Self::Item, Self::Meta> { ... } fn skip(self, n: usize) -> Skip<Self> where Self: Sized { ... } fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where Self: Sized, P: FnMut(&Self::Item) -> bool { ... } fn take(self, n: usize) -> Take<Self> where Self: Sized { ... } fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where Self: Sized, P: FnMut(&Self::Item) -> bool { ... } fn zip<U>(self, other: U) -> Zip<Self, U> where Self: Sized, U: Pull<Meta = Self::Meta> { ... } fn zip_longest<U>(self, other: U) -> ZipLongest<Self, U> where Self: Sized + FusedPull, U: FusedPull<Meta = Self::Meta> { ... } fn next(self) -> Next<Self> where Self: Sized { ... } fn cross_singleton<SinglePull>( self, singleton_pull: SinglePull, ) -> CrossSingleton<Self, SinglePull, Option<SinglePull::Item>> where Self: Sized, SinglePull: Pull, SinglePull::Item: Clone { ... } fn cross_singleton_state<SinglePull>( self, singleton_pull: SinglePull, singleton_state: &mut Option<SinglePull::Item>, ) -> CrossSingleton<Self, SinglePull, &mut Option<SinglePull::Item>> where Self: Sized, SinglePull: Pull, SinglePull::Item: Clone { ... } fn symmetric_hash_join<Key, V1, Rhs, V2, LhsState, RhsState>( self, rhs: Rhs, lhs_state: LhsState, rhs_state: RhsState, ) -> SymmetricHashJoin<Self, Rhs, LhsState, RhsState, LhsState, RhsState> where Self: Sized + FusedPull<Item = (Key, V1), Meta = ()>, Key: Eq + Hash + Clone, V1: Clone, V2: Clone, Rhs: FusedPull<Item = (Key, V2), Meta = ()>, LhsState: HalfJoinState<Key, V1, V2>, RhsState: HalfJoinState<Key, V2, V1> { ... } fn symmetric_hash_join_state<'a, Key, V1, Rhs, V2, LhsState, RhsState>( self, rhs: Rhs, lhs_state: &'a mut LhsState, rhs_state: &'a mut RhsState, ) -> SymmetricHashJoin<Self, Rhs, &'a mut LhsState, &'a mut RhsState, LhsState, RhsState> where Self: Sized + FusedPull<Item = (Key, V1), Meta = ()>, Key: Eq + Hash + Clone, V1: Clone, V2: Clone, Rhs: FusedPull<Item = (Key, V2), Meta = ()>, LhsState: HalfJoinState<Key, V1, V2>, RhsState: HalfJoinState<Key, V2, V1> { ... }
}
Expand description

The Pull trait represents a pull-based stream that can be polled for items.

The Ctx type parameter allows operators to be generic over the context type. Most operators don’t use the context and just forward it to their predecessor, so they can be generic over Ctx. Operators that need std::task::Context (like StreamReady) will use Ctx = &mut Context<'_>.

Setting Ctx = () allows most pull pipelines to be used without any context.

Required Associated Types§

Source

type Ctx<'ctx>: Context<'ctx>

The context type required to poll this pull.

Source

type Item

The type of items yielded by this pull.

Source

type Meta: Copy

The metadata type associated with each item.

Source

type CanPend: Toggle

Whether this pull can return PullStep::Pending.

Source

type CanEnd: Toggle

Whether this pull can return PullStep::Ended.

Required Methods§

Source

fn pull( self: Pin<&mut Self>, ctx: &mut Self::Ctx<'_>, ) -> PullStep<Self::Item, Self::Meta, Self::CanPend, Self::CanEnd>

Attempts to pull the next item from this stream.

Source

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the pull.

Specifically, size_hint() returns a tuple where the first element is the lower bound, and the second element is the upper bound.

The second half of the tuple that is returned is an Option<usize>. A None here means that either there is no known upper bound, or the upper bound is larger than usize.

§Implementation notes

It is not enforced that a pull implementation yields the declared number of elements. A buggy pull may yield less than the lower bound or more than the upper bound of elements.

size_hint() is primarily intended to be used for optimizations such as reserving space for the elements of the pull, but must not be trusted to e.g., omit bounds checks in unsafe code. An incorrect implementation of size_hint() should not lead to memory safety violations.

That said, the implementation should provide a correct estimation, because otherwise it would be a violation of the trait’s protocol.

A default implementation should return (0, None) which is correct for any pull. However this is not provided, to prevent oversight.

Provided Methods§

Source

fn by_ref(&mut self) -> &mut Self

Borrows this pull, allowing it to be used by reference.

Source

fn chain<U>(self, other: U) -> Chain<Self, U>
where Self: Sized + FusedPull<CanEnd = Yes>, U: Pull<Item = Self::Item, Meta = Self::Meta>,

Takes two pulls and creates a new pull over both in sequence.

chain() will return a new pull which will first iterate over values from the first pull and then over values from the second pull.

The first pull must be finite (CanEnd = Yes) and fused (FusedPull).

Source

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Creates a pull which gives the current iteration count as well as the next value.

The pull returned yields pairs (i, val), where i is the current index of iteration and val is the value returned by the pull.

Source

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates a pull which uses a closure to determine if an element should be yielded.

Given an element the closure must return true or false. The returned pull will yield only the elements for which the closure returns true.

Source

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Creates a pull that both filters and maps.

The returned pull yields only the values for which the supplied closure returns Some(value).

Source

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F, U::IntoIter, Self::Meta>
where Self: Sized, F: FnMut(Self::Item) -> U, U: IntoIterator,

Creates a pull that works like map, but flattens nested structure.

The flat_map() method is useful when you have a pull of items, and you want to apply a function that returns an iterator for each item, then flatten all those iterators into a single pull.

Source

fn flatten( self, ) -> Flatten<Self, <Self::Item as IntoIterator>::IntoIter, Self::Meta>
where Self: Sized, Self::Item: IntoIterator,

Creates a pull that flattens nested structure.

This is useful when you have a pull of iterables, and you want to flatten them into a single pull.

Source

fn flatten_stream(self) -> FlattenStream<Self, Self::Item, Self::Meta>
where Self: Sized, Self::Item: Stream,

Creates a pull that flattens items that are streams by polling each inner stream.

This is useful when you have a pull of streams, and you want to flatten them into a single pull. Requires an async context since inner streams are polled.

Source

fn for_each<F>(self, f: F) -> ForEach<Self, F>
where Self: Sized, F: FnMut(Self::Item),

Creates a future which runs the given function on each element of a pull.

Source

fn collect<C>(self) -> Collect<Self, C>
where Self: Sized, C: Default + Extend<Self::Item>,

Creates a future which collects all elements of a pull into a collection.

The collection type C must implement Default and Extend<Item>.

Source

fn fuse( self, ) -> impl for<'ctx> FusedPull<Ctx<'ctx> = Self::Ctx<'ctx>, Item = Self::Item, Meta = Self::Meta, CanPend = Self::CanPend, CanEnd = Self::CanEnd>
where Self: Sized,

Creates a pull that ends after the first None.

After a pull returns Ended for the first time, the behavior of calling pull again is implementation-defined. fuse() adapts any pull, ensuring that after Ended is given once, it will always return Ended forever.

Usually this method will simply return Fuse<Self>, but it may be overridden for optimization.

Source

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where Self: Sized, F: FnMut(&Self::Item),

Does something with each element of a pull, passing the value on.

When using pulls, you’ll often chain several of them together. While working on such code, you might want to check out what’s happening at various parts in the pipeline. To do that, insert a call to inspect().

Source

fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> B,

Takes a closure and creates a pull that calls that closure on each element.

map() transforms one pull into another, by means of its argument: something that implements FnMut. It produces a new pull which calls this closure on each element of the original pull.

Source

fn send_sink<Push>(self, push: Push) -> SendSink<Self, Push>
where Self: Sized, Push: Sink<Self::Item>,

Creates a future that pulls all items and sends them into a crate::Sink.

Source

fn send_push<Psh>(self, push: Psh) -> SendPush<Self, Psh>
where Self: Sized, Psh: Push<Self::Item, Self::Meta>,

Creates a future that pulls all items and pushes them into a crate::push::Push.

Source

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Creates a pull that skips the first n elements.

Source

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates a pull that skips elements based on a predicate.

skip_while() takes a closure as an argument. It will call this closure on each element of the pull, and ignore elements until it returns false.

Source

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Creates a pull that yields the first n elements, or fewer if the underlying pull ends sooner.

Source

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates a pull that yields elements based on a predicate.

take_while() takes a closure as an argument. It will call this closure on each element of the pull, and yield elements while it returns true.

Source

fn zip<U>(self, other: U) -> Zip<Self, U>
where Self: Sized, U: Pull<Meta = Self::Meta>,

Zips two pulls together, stopping once either is exhausted.

Source

fn zip_longest<U>(self, other: U) -> ZipLongest<Self, U>
where Self: Sized + FusedPull, U: FusedPull<Meta = Self::Meta>,

Zips two pulls together, continuing until both are exhausted.

Unlike a regular zip which ends when either pull ends, zip_longest continues until both pulls have ended, yielding crate::EitherOrBoth values to indicate which pulls yielded items.

Both pulls must be fused (FusedPull) to ensure correct behavior after one pull ends.

Source

fn next(self) -> Next<Self>
where Self: Sized,

Creates a future that resolves with the next item from this pull.

This is the Pull equivalent of the StreamExt::next() future.

Source

fn cross_singleton<SinglePull>( self, singleton_pull: SinglePull, ) -> CrossSingleton<Self, SinglePull, Option<SinglePull::Item>>
where Self: Sized, SinglePull: Pull, SinglePull::Item: Clone,

Crosses each item from this pull with a singleton value from another pull.

The singleton value is obtained from the first item of singleton_pull and cached. All subsequent items from this pull are paired with this cached singleton value.

If singleton_pull ends before yielding any items, the entire combinator ends immediately.

Source

fn cross_singleton_state<SinglePull>( self, singleton_pull: SinglePull, singleton_state: &mut Option<SinglePull::Item>, ) -> CrossSingleton<Self, SinglePull, &mut Option<SinglePull::Item>>
where Self: Sized, SinglePull: Pull, SinglePull::Item: Clone,

Self::cross_singleton with external state.

Source

fn symmetric_hash_join<Key, V1, Rhs, V2, LhsState, RhsState>( self, rhs: Rhs, lhs_state: LhsState, rhs_state: RhsState, ) -> SymmetricHashJoin<Self, Rhs, LhsState, RhsState, LhsState, RhsState>
where Self: Sized + FusedPull<Item = (Key, V1), Meta = ()>, Key: Eq + Hash + Clone, V1: Clone, V2: Clone, Rhs: FusedPull<Item = (Key, V2), Meta = ()>, LhsState: HalfJoinState<Key, V1, V2>, RhsState: HalfJoinState<Key, V2, V1>,

Available on crate feature std only.

Performs a symmetric hash join with another pull.

Joins items from this pull with items from rhs based on a common key. Both pulls must yield (Key, Value) tuples. The result is a pull of (Key, (V1, V2)) tuples for each matching pair.

The lhs_state and rhs_state parameters store the join state and must implement HalfJoinState.

Source

fn symmetric_hash_join_state<'a, Key, V1, Rhs, V2, LhsState, RhsState>( self, rhs: Rhs, lhs_state: &'a mut LhsState, rhs_state: &'a mut RhsState, ) -> SymmetricHashJoin<Self, Rhs, &'a mut LhsState, &'a mut RhsState, LhsState, RhsState>
where Self: Sized + FusedPull<Item = (Key, V1), Meta = ()>, Key: Eq + Hash + Clone, V1: Clone, V2: Clone, Rhs: FusedPull<Item = (Key, V2), Meta = ()>, LhsState: HalfJoinState<Key, V1, V2>, RhsState: HalfJoinState<Key, V2, V1>,

Available on crate feature std only.

Self::symmetric_hash_join with external state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<P> Pull for &mut P
where P: Pull + Unpin + ?Sized,

Source§

type Ctx<'ctx> = <P as Pull>::Ctx<'ctx>

Source§

type Item = <P as Pull>::Item

Source§

type Meta = <P as Pull>::Meta

Source§

type CanPend = <P as Pull>::CanPend

Source§

type CanEnd = <P as Pull>::CanEnd

Source§

fn pull( self: Pin<&mut Self>, ctx: &mut Self::Ctx<'_>, ) -> PullStep<Self::Item, Self::Meta, Self::CanPend, Self::CanEnd>

Source§

fn size_hint(&self) -> (usize, Option<usize>)

Implementors§

Source§

impl<A, B> Pull for Chain<A, B>
where A: FusedPull<CanEnd = Yes>, B: Pull<Item = A::Item, Meta = A::Meta>,

Source§

type Ctx<'ctx> = <<A as Pull>::Ctx<'ctx> as Context<'ctx>>::Merged<<B as Pull>::Ctx<'ctx>>

Source§

type Item = <A as Pull>::Item

Source§

type Meta = <A as Pull>::Meta

Source§

type CanPend = <<A as Pull>::CanPend as Toggle>::Or<<B as Pull>::CanPend>

Source§

type CanEnd = <B as Pull>::CanEnd

Source§

impl<F, Item, Meta, CanEnd> Pull for FromFn<F, Item, Meta, CanEnd>
where F: FnMut() -> PullStep<Item, Meta, No, CanEnd>, Meta: Copy, CanEnd: Toggle,

Source§

type Ctx<'ctx> = ()

Source§

type Item = Item

Source§

type Meta = Meta

Source§

type CanPend = Infallible

Source§

type CanEnd = CanEnd

Source§

impl<F, Item, Meta, CanPend, CanEnd> Pull for PollFn<F, Item, Meta, CanPend, CanEnd>
where F: FnMut(&mut Context<'_>) -> PullStep<Item, Meta, CanPend, CanEnd>, Meta: Copy, CanPend: Toggle, CanEnd: Toggle,

Source§

type Ctx<'ctx> = Context<'ctx>

Source§

type Item = Item

Source§

type Meta = Meta

Source§

type CanPend = CanPend

Source§

type CanEnd = CanEnd

Source§

impl<I> Pull for Iter<I>
where I: Iterator,

Source§

impl<Item> Pull for Empty<Item>

Source§

impl<Item> Pull for Once<Item>

Source§

impl<Item> Pull for Pending<Item>

Source§

impl<Item> Pull for Repeat<Item>
where Item: Clone,

Source§

impl<ItemPull, SinglePull, SingleState> Pull for CrossSingleton<ItemPull, SinglePull, SingleState>
where ItemPull: Pull, SinglePull: Pull, SinglePull::Item: Clone, SingleState: BorrowMut<Option<SinglePull::Item>>,

Source§

type Ctx<'ctx> = <<ItemPull as Pull>::Ctx<'ctx> as Context<'ctx>>::Merged<<SinglePull as Pull>::Ctx<'ctx>>

Source§

type Item = (<ItemPull as Pull>::Item, <SinglePull as Pull>::Item)

Source§

type Meta = <ItemPull as Pull>::Meta

Source§

type CanPend = <<ItemPull as Pull>::CanPend as Toggle>::Or<<SinglePull as Pull>::CanPend>

Source§

type CanEnd = <<ItemPull as Pull>::CanEnd as Toggle>::Or<<SinglePull as Pull>::CanEnd>

Source§

impl<Key, Lhs, V1, Rhs, V2, LhsState, RhsState, LhsStateInner, RhsStateInner> Pull for SymmetricHashJoin<Lhs, Rhs, LhsState, RhsState, LhsStateInner, RhsStateInner>
where Key: Eq + Hash + Clone, V1: Clone, V2: Clone, Lhs: FusedPull<Item = (Key, V1), Meta = ()>, Rhs: FusedPull<Item = (Key, V2), Meta = ()>, LhsState: BorrowMut<LhsStateInner>, RhsState: BorrowMut<RhsStateInner>, LhsStateInner: HalfJoinState<Key, V1, V2>, RhsStateInner: HalfJoinState<Key, V2, V1>,

Available on crate feature std only.
Source§

type Ctx<'ctx> = <<Lhs as Pull>::Ctx<'ctx> as Context<'ctx>>::Merged<<Rhs as Pull>::Ctx<'ctx>>

Source§

type Item = (Key, (V1, V2))

Source§

type Meta = ()

Source§

type CanPend = <<Lhs as Pull>::CanPend as Toggle>::Or<<Rhs as Pull>::CanPend>

Source§

type CanEnd = <<Lhs as Pull>::CanEnd as Toggle>::And<<Rhs as Pull>::CanEnd>

Source§

impl<L, R> Pull for Either<L, R>
where L: Pull, R: Pull<Item = L::Item, Meta = L::Meta>,

Source§

type Ctx<'ctx> = <<L as Pull>::Ctx<'ctx> as Context<'ctx>>::Merged<<R as Pull>::Ctx<'ctx>>

Source§

type Item = <L as Pull>::Item

Source§

type Meta = <L as Pull>::Meta

Source§

type CanPend = <<L as Pull>::CanPend as Toggle>::Or<<R as Pull>::CanPend>

Source§

type CanEnd = <<L as Pull>::CanEnd as Toggle>::Or<<R as Pull>::CanEnd>

Source§

impl<Prev1, Prev2> Pull for Zip<Prev1, Prev2>
where Prev1: Pull, Prev2: Pull<Meta = Prev1::Meta>,

Source§

type Ctx<'ctx> = <<Prev1 as Pull>::Ctx<'ctx> as Context<'ctx>>::Merged<<Prev2 as Pull>::Ctx<'ctx>>

Source§

type Item = (<Prev1 as Pull>::Item, <Prev2 as Pull>::Item)

Source§

type Meta = <Prev1 as Pull>::Meta

Source§

type CanPend = <<Prev1 as Pull>::CanPend as Toggle>::Or<<Prev2 as Pull>::CanPend>

Source§

type CanEnd = <<Prev1 as Pull>::CanEnd as Toggle>::Or<<Prev2 as Pull>::CanEnd>

Source§

impl<Prev1, Prev2> Pull for ZipLongest<Prev1, Prev2>
where Prev1: FusedPull, Prev2: FusedPull<Meta = Prev1::Meta>,

Source§

type Ctx<'ctx> = <<Prev1 as Pull>::Ctx<'ctx> as Context<'ctx>>::Merged<<Prev2 as Pull>::Ctx<'ctx>>

Source§

type Item = EitherOrBoth<<Prev1 as Pull>::Item, <Prev2 as Pull>::Item>

Source§

type Meta = <Prev1 as Pull>::Meta

Source§

type CanPend = <<Prev1 as Pull>::CanPend as Toggle>::Or<<Prev2 as Pull>::CanPend>

Source§

type CanEnd = <<Prev1 as Pull>::CanEnd as Toggle>::And<<Prev2 as Pull>::CanEnd>

Source§

impl<Prev> Pull for Enumerate<Prev>
where Prev: Pull,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = (usize, <Prev as Pull>::Item)

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev> Pull for Flatten<Prev, <Prev::Item as IntoIterator>::IntoIter, Prev::Meta>
where Prev: Pull, Prev::Item: IntoIterator,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <<Prev as Pull>::Item as IntoIterator>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev> Pull for FlattenStream<Prev, Prev::Item, Prev::Meta>
where Prev: Pull, Prev::Item: Stream,

Source§

type Ctx<'ctx> = Context<'ctx>

Source§

type Item = <<Prev as Pull>::Item as Stream>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = Yes

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev> Pull for Fuse<Prev>
where Prev: Pull,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <Prev as Pull>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev> Pull for Skip<Prev>
where Prev: Pull,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <Prev as Pull>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev> Pull for Take<Prev>
where Prev: Pull,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <Prev as Pull>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = Yes

Source§

impl<Prev, Func> Pull for Filter<Prev, Func>
where Prev: Pull, Func: FnMut(&Prev::Item) -> bool,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <Prev as Pull>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev, Func> Pull for Inspect<Prev, Func>
where Prev: Pull, Func: FnMut(&Prev::Item),

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <Prev as Pull>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev, Func> Pull for SkipWhile<Prev, Func>
where Prev: Pull, Func: FnMut(&Prev::Item) -> bool,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <Prev as Pull>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev, Func> Pull for TakeWhile<Prev, Func>
where Prev: Pull, Func: FnMut(&Prev::Item) -> bool,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <Prev as Pull>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = Yes

Source§

impl<Prev, Func, IntoIter> Pull for FlatMap<Prev, Func, IntoIter::IntoIter, Prev::Meta>
where Prev: Pull, Func: FnMut(Prev::Item) -> IntoIter, IntoIter: IntoIterator,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = <IntoIter as IntoIterator>::Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev, Func, Item> Pull for FilterMap<Prev, Func>
where Prev: Pull, Func: FnMut(Prev::Item) -> Option<Item>,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<Prev, Func, Item> Pull for Map<Prev, Func>
where Prev: Pull, Func: FnMut(Prev::Item) -> Item,

Source§

type Ctx<'ctx> = <Prev as Pull>::Ctx<'ctx>

Source§

type Item = Item

Source§

type Meta = <Prev as Pull>::Meta

Source§

type CanPend = <Prev as Pull>::CanPend

Source§

type CanEnd = <Prev as Pull>::CanEnd

Source§

impl<S> Pull for StreamReady<S>
where S: Stream,

StreamReady uses its own waker, so it ignores the context parameter. It implements Pull with Ctx = ().

Source§

impl<St> Pull for Stream<St>
where St: Stream,

Source§

type Ctx<'ctx> = Context<'ctx>

Source§

type Item = <St as Stream>::Item

Source§

type Meta = ()

Source§

type CanPend = Yes

Source§

type CanEnd = Yes