pub struct Flatten<Prev, Iter, Meta> { /* private fields */ }Expand description
Pull combinator that flattens nested iterables.
Trait Implementations§
Source§impl<Prev> Pull for Flatten<Prev, <Prev::Item as IntoIterator>::IntoIter, Prev::Meta>
impl<Prev> Pull for Flatten<Prev, <Prev::Item as IntoIterator>::IntoIter, Prev::Meta>
Source§type Item = <<Prev as Pull>::Item as IntoIterator>::Item
type Item = <<Prev as Pull>::Item as IntoIterator>::Item
The type of items yielded by this pull.
Source§fn pull(
self: Pin<&mut Self>,
ctx: &mut Self::Ctx<'_>,
) -> PullStep<Self::Item, Self::Meta, Self::CanPend, Self::CanEnd>
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>)
fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the pull. Read more
Source§fn chain<U>(self, other: U) -> Chain<Self, U>
fn chain<U>(self, other: U) -> Chain<Self, U>
Takes two pulls and creates a new pull over both in sequence. Read more
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates a pull which gives the current iteration count as well as the next value. Read more
Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Creates a pull which uses a closure to determine if an element should be yielded. Read more
Source§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
Creates a pull that both filters and maps. Read more
Source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F, U::IntoIter, Self::Meta>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, F, U::IntoIter, Self::Meta>
Creates a pull that works like map, but flattens nested structure. Read more
Source§fn flatten(
self,
) -> Flatten<Self, <Self::Item as IntoIterator>::IntoIter, Self::Meta>
fn flatten( self, ) -> Flatten<Self, <Self::Item as IntoIterator>::IntoIter, Self::Meta>
Creates a pull that flattens nested structure. Read more
Source§fn flatten_stream(self) -> FlattenStream<Self, Self::Item, Self::Meta>
fn flatten_stream(self) -> FlattenStream<Self, Self::Item, Self::Meta>
Creates a pull that flattens items that are streams by polling each inner stream. Read more
Source§fn for_each<F>(self, f: F) -> ForEach<Self, F> ⓘ
fn for_each<F>(self, f: F) -> ForEach<Self, F> ⓘ
Creates a future which runs the given function on each element of a pull.
Source§fn collect<C>(self) -> Collect<Self, C> ⓘ
fn collect<C>(self) -> Collect<Self, C> ⓘ
Creates a future which collects all elements of a pull into a collection. Read more
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,
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. Read moreSource§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Does something with each element of a pull, passing the value on. Read more
Source§fn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
Takes a closure and creates a pull that calls that closure on each element. Read more
Source§fn send_sink<Push>(self, push: Push) -> SendSink<Self, Push> ⓘ
fn send_sink<Push>(self, push: Push) -> SendSink<Self, Push> ⓘ
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> ⓘ
fn send_push<Psh>(self, push: Psh) -> SendPush<Self, Psh> ⓘ
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,
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>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
Creates a pull that skips elements based on a predicate. Read more
Source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
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>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
Creates a pull that yields elements based on a predicate. Read more
Source§fn zip<U>(self, other: U) -> Zip<Self, U>
fn zip<U>(self, other: U) -> Zip<Self, U>
Zips two pulls together, stopping once either is exhausted.
Source§fn zip_longest<U>(self, other: U) -> ZipLongest<Self, U>
fn zip_longest<U>(self, other: U) -> ZipLongest<Self, U>
Zips two pulls together, continuing until both are exhausted. Read more
Source§fn next(self) -> Next<Self> ⓘwhere
Self: Sized,
fn next(self) -> Next<Self> ⓘwhere
Self: Sized,
Creates a future that resolves with the next item from this pull. Read more
Source§fn cross_singleton<SinglePull>(
self,
singleton_pull: SinglePull,
) -> CrossSingleton<Self, SinglePull, Option<SinglePull::Item>>
fn cross_singleton<SinglePull>( self, singleton_pull: SinglePull, ) -> CrossSingleton<Self, SinglePull, Option<SinglePull::Item>>
Crosses each item from this pull with a singleton value from another pull. Read more
Source§fn cross_singleton_state<SinglePull>(
self,
singleton_pull: SinglePull,
singleton_state: &mut Option<SinglePull::Item>,
) -> CrossSingleton<Self, SinglePull, &mut Option<SinglePull::Item>>
fn cross_singleton_state<SinglePull>( self, singleton_pull: SinglePull, singleton_state: &mut Option<SinglePull::Item>, ) -> CrossSingleton<Self, SinglePull, &mut Option<SinglePull::Item>>
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>
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>
Available on crate feature
std only.Performs a symmetric hash join with another pull. Read more
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>
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>
Available on crate feature
std only.Self::symmetric_hash_join with external state.
impl<Prev> FusedPull for Flatten<Prev, <Prev::Item as IntoIterator>::IntoIter, Prev::Meta>
impl<'__pin, Prev, Iter, Meta> Unpin for Flatten<Prev, Iter, Meta>where
PinnedFieldsOf<__Origin<'__pin, Prev, Iter, Meta>>: Unpin,
Auto Trait Implementations§
impl<Prev, Iter, Meta> Freeze for Flatten<Prev, Iter, Meta>
impl<Prev, Iter, Meta> RefUnwindSafe for Flatten<Prev, Iter, Meta>
impl<Prev, Iter, Meta> Send for Flatten<Prev, Iter, Meta>
impl<Prev, Iter, Meta> Sync for Flatten<Prev, Iter, Meta>
impl<Prev, Iter, Meta> UnsafeUnpin for Flatten<Prev, Iter, Meta>
impl<Prev, Iter, Meta> UnwindSafe for Flatten<Prev, Iter, Meta>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more