pub struct Zip<S1: Stream, S2: Stream> { /* private fields */ }Expand description
A stream that zips two streams into pairs.
Created by StreamExt::zip.
Implementations§
Trait Implementations§
Source§impl<S1, S2> Stream for Zip<S1, S2>
impl<S1, S2> Stream for Zip<S1, S2>
impl<'pin, S1: Stream, S2: Stream> Unpin for Zip<S1, S2>where
PinnedFieldsOf<__Zip<'pin, S1, S2>>: Unpin,
Auto Trait Implementations§
impl<S1, S2> Freeze for Zip<S1, S2>
impl<S1, S2> RefUnwindSafe for Zip<S1, S2>where
S1: RefUnwindSafe,
S2: RefUnwindSafe,
<S1 as Stream>::Item: RefUnwindSafe,
<S2 as Stream>::Item: RefUnwindSafe,
impl<S1, S2> Send for Zip<S1, S2>
impl<S1, S2> Sync for Zip<S1, S2>
impl<S1, S2> UnsafeUnpin for Zip<S1, S2>where
S1: UnsafeUnpin,
S2: UnsafeUnpin,
<S1 as Stream>::Item: UnsafeUnpin,
<S2 as Stream>::Item: UnsafeUnpin,
impl<S1, S2> UnwindSafe for Zip<S1, S2>where
S1: UnwindSafe,
S2: UnwindSafe,
<S1 as Stream>::Item: UnwindSafe,
<S2 as Stream>::Item: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<S> StreamExt for S
impl<S> StreamExt for S
Source§fn next(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
fn next(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
Returns the next item from the stream. Read more
Source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
Transforms each item using an async closure.
Source§fn merge(self, other: Self) -> Merge<Self>where
Self: Sized,
fn merge(self, other: Self) -> Merge<Self>where
Self: Sized,
Interleaves this stream with another stream of the same concrete type. Read more
Source§fn zip<S2>(self, other: S2) -> Zip<Self, S2>
fn zip<S2>(self, other: S2) -> Zip<Self, S2>
Zips this stream with another stream, yielding pairs.
Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Yields only items that match the predicate.
Source§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
Filters and transforms items in one step.
Source§fn partition<P>(
self,
predicate: P,
lane_capacity: usize,
) -> (Partition<Self, P>, Partition<Self, P>)
fn partition<P>( self, predicate: P, lane_capacity: usize, ) -> (Partition<Self, P>, Partition<Self, P>)
Splits this stream into two by
predicate. Read moreSource§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
Takes items while the predicate is true.
Source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
Skips items while the predicate is true.
Source§fn buffered(self, n: usize) -> Buffered<Self>
fn buffered(self, n: usize) -> Buffered<Self>
Buffers up to
n futures, preserving output order.Source§fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
Buffers up to
n futures, yielding results as they complete.Source§fn try_buffered(self, n: usize) -> TryBuffered<Self>
fn try_buffered(self, n: usize) -> TryBuffered<Self>
Source§fn collect_into<C>(self, collection: C) -> Collect<Self, C> ⓘ
fn collect_into<C>(self, collection: C) -> Collect<Self, C> ⓘ
Collects all items into
collection, reusing its existing allocation. Read moreSource§fn chunks(self, size: usize) -> Chunks<Self>where
Self: Sized,
fn chunks(self, size: usize) -> Chunks<Self>where
Self: Sized,
Collects items into fixed-size chunks.
Source§fn ready_chunks(self, size: usize) -> ReadyChunks<Self>where
Self: Sized,
fn ready_chunks(self, size: usize) -> ReadyChunks<Self>where
Self: Sized,
Yields immediately available items up to a maximum chunk size.
Source§fn fold<Acc, F>(self, init: Acc, f: F) -> Fold<Self, F, Acc> ⓘ
fn fold<Acc, F>(self, init: Acc, f: F) -> Fold<Self, F, Acc> ⓘ
Folds all items into a single value.
Source§fn for_each_async<F, Fut>(self, f: F) -> ForEachAsync<Self, F, Fut> ⓘ
fn for_each_async<F, Fut>(self, f: F) -> ForEachAsync<Self, F, Fut> ⓘ
Executes an async closure for each item.
Source§fn try_collect<T, E, C>(self) -> TryCollect<Self, C> ⓘ
fn try_collect<T, E, C>(self) -> TryCollect<Self, C> ⓘ
Collects items from a stream of Results, short-circuiting on error.
Source§fn try_fold<T, E, Acc, F>(self, init: Acc, f: F) -> TryFold<Self, F, Acc> ⓘ
fn try_fold<T, E, Acc, F>(self, init: Acc, f: F) -> TryFold<Self, F, Acc> ⓘ
Folds a stream of Results, short-circuiting on error.
Source§fn try_for_each<F, E>(self, f: F) -> TryForEach<Self, F> ⓘ
fn try_for_each<F, E>(self, f: F) -> TryForEach<Self, F> ⓘ
Executes a fallible closure for each item, short-circuiting on error.
Source§fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
Yields intermediate accumulator values, like
Iterator::scan. Read moreSource§fn peekable(self) -> Peekable<Self>where
Self: Sized,
fn peekable(self) -> Peekable<Self>where
Self: Sized,
Creates a peekable stream that supports looking at the next
item without consuming it.