pub struct ZipLongest<Prev1, Prev2>{ /* private fields */ }Expand description
A pull that zips two pulls together, continuing until both are exhausted.
Unlike a regular zip which ends when either pull ends, ZipLongest
continues until both pulls have ended, yielding EitherOrBoth values.
Both upstream pulls must be fused (FusedPull) to ensure correct
behavior after one pull ends.
Trait Implementations§
Source§impl<Prev1, Prev2> Clone for ZipLongest<Prev1, Prev2>
impl<Prev1, Prev2> Clone for ZipLongest<Prev1, Prev2>
Source§fn clone(&self) -> ZipLongest<Prev1, Prev2>
fn clone(&self) -> ZipLongest<Prev1, Prev2>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Prev1, Prev2> Debug for ZipLongest<Prev1, Prev2>
impl<Prev1, Prev2> Debug for ZipLongest<Prev1, Prev2>
Source§impl<Prev1, Prev2> Pull for ZipLongest<Prev1, Prev2>
impl<Prev1, Prev2> Pull for ZipLongest<Prev1, Prev2>
Source§type Ctx<'ctx> = <<Prev1 as Pull>::Ctx<'ctx> as Context<'ctx>>::Merged<<Prev2 as Pull>::Ctx<'ctx>>
type Ctx<'ctx> = <<Prev1 as Pull>::Ctx<'ctx> as Context<'ctx>>::Merged<<Prev2 as Pull>::Ctx<'ctx>>
The context type required to poll this pull.
Source§type Item = EitherOrBoth<<Prev1 as Pull>::Item, <Prev2 as Pull>::Item>
type Item = EitherOrBoth<<Prev1 as Pull>::Item, <Prev2 as Pull>::Item>
The type of items yielded by this pull.
Source§type CanPend = <<Prev1 as Pull>::CanPend as Toggle>::Or<<Prev2 as Pull>::CanPend>
type CanPend = <<Prev1 as Pull>::CanPend as Toggle>::Or<<Prev2 as Pull>::CanPend>
Whether this pull can return
PullStep::Pending.Source§type CanEnd = <<Prev1 as Pull>::CanEnd as Toggle>::And<<Prev2 as Pull>::CanEnd>
type CanEnd = <<Prev1 as Pull>::CanEnd as Toggle>::And<<Prev2 as Pull>::CanEnd>
Whether this pull can return
PullStep::Ended.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 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 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 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<A, B> FusedPull for ZipLongest<A, B>
impl<'__pin, Prev1, Prev2> Unpin for ZipLongest<Prev1, Prev2>
Auto Trait Implementations§
impl<Prev1, Prev2> Freeze for ZipLongest<Prev1, Prev2>
impl<Prev1, Prev2> RefUnwindSafe for ZipLongest<Prev1, Prev2>where
Prev1: RefUnwindSafe,
Prev2: RefUnwindSafe,
<Prev1 as Pull>::Item: RefUnwindSafe,
<Prev1 as Pull>::Meta: RefUnwindSafe,
<Prev2 as Pull>::Item: RefUnwindSafe,
<Prev2 as Pull>::Meta: RefUnwindSafe,
impl<Prev1, Prev2> Send for ZipLongest<Prev1, Prev2>
impl<Prev1, Prev2> Sync for ZipLongest<Prev1, Prev2>
impl<Prev1, Prev2> UnsafeUnpin for ZipLongest<Prev1, Prev2>where
Prev1: UnsafeUnpin,
Prev2: UnsafeUnpin,
<Prev1 as Pull>::Item: UnsafeUnpin,
<Prev1 as Pull>::Meta: UnsafeUnpin,
<Prev2 as Pull>::Item: UnsafeUnpin,
<Prev2 as Pull>::Meta: UnsafeUnpin,
impl<Prev1, Prev2> UnwindSafe for ZipLongest<Prev1, Prev2>where
Prev1: UnwindSafe,
Prev2: UnwindSafe,
<Prev1 as Pull>::Item: UnwindSafe,
<Prev1 as Pull>::Meta: UnwindSafe,
<Prev2 as Pull>::Item: UnwindSafe,
<Prev2 as Pull>::Meta: UnwindSafe,
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