pub struct Zip<St1, St2>{ /* private fields */ }
Expand description
Stream for the zip
method.
Implementations§
Source§impl<St1, St2> Zip<St1, St2>
impl<St1, St2> Zip<St1, St2>
Sourcepub fn get_ref(&self) -> (&St1, &St2)
pub fn get_ref(&self) -> (&St1, &St2)
Acquires a reference to the underlying streams that this combinator is pulling from.
Sourcepub fn get_mut(&mut self) -> (&mut St1, &mut St2)
pub fn get_mut(&mut self) -> (&mut St1, &mut St2)
Acquires a mutable reference to the underlying streams that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.
Sourcepub fn get_pin_mut(
self: Pin<&mut Zip<St1, St2>>,
) -> (Pin<&mut St1>, Pin<&mut St2>)
pub fn get_pin_mut( self: Pin<&mut Zip<St1, St2>>, ) -> (Pin<&mut St1>, Pin<&mut St2>)
Acquires a pinned mutable reference to the underlying streams that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.
Sourcepub fn into_inner(self) -> (St1, St2)
pub fn into_inner(self) -> (St1, St2)
Consumes this combinator, returning the underlying streams.
Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.
Trait Implementations§
Source§impl<St1, St2> FusedStream for Zip<St1, St2>
impl<St1, St2> FusedStream for Zip<St1, St2>
Source§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
true
if the stream should no longer be polled.Source§impl<St1, St2> Stream for Zip<St1, St2>
impl<St1, St2> Stream for Zip<St1, St2>
Source§fn poll_next(
self: Pin<&mut Zip<St1, St2>>,
cx: &mut Context<'_>,
) -> Poll<Option<<Zip<St1, St2> as Stream>::Item>>
fn poll_next( self: Pin<&mut Zip<St1, St2>>, cx: &mut Context<'_>, ) -> Poll<Option<<Zip<St1, St2> as Stream>::Item>>
None
if the stream is exhausted. Read moreimpl<'__pin, St1, St2> Unpin for Zip<St1, St2>
Auto Trait Implementations§
impl<St1, St2> Freeze for Zip<St1, St2>
impl<St1, St2> RefUnwindSafe for Zip<St1, St2>where
St1: RefUnwindSafe,
St2: RefUnwindSafe,
<St1 as Stream>::Item: RefUnwindSafe,
<St2 as Stream>::Item: RefUnwindSafe,
impl<St1, St2> Send for Zip<St1, St2>
impl<St1, St2> Sync for Zip<St1, St2>
impl<St1, St2> UnwindSafe for Zip<St1, St2>where
St1: UnwindSafe,
St2: UnwindSafe,
<St1 as Stream>::Item: UnwindSafe,
<St2 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
Source§impl<T> StreamExt for T
impl<T> StreamExt for T
Source§fn next(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
fn next(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
Source§fn into_future(self) -> StreamFuture<Self> ⓘ
fn into_future(self) -> StreamFuture<Self> ⓘ
Source§fn map<T, F>(self, f: F) -> Map<Self, F>
fn map<T, F>(self, f: F) -> Map<Self, F>
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Source§fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
Source§fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
Source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
Source§fn collect<C>(self) -> Collect<Self, C> ⓘ
fn collect<C>(self) -> Collect<Self, C> ⓘ
Source§fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘ
fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘ
Source§fn concat(self) -> Concat<Self> ⓘ
fn concat(self) -> Concat<Self> ⓘ
Source§fn count(self) -> Count<Self> ⓘwhere
Self: Sized,
fn count(self) -> Count<Self> ⓘwhere
Self: Sized,
Source§fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> ⓘ
fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> ⓘ
Source§fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘ
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘ
true
if any element in stream satisfied a predicate. Read moreSource§fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> ⓘ
fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> ⓘ
true
if all element in stream satisfied a predicate. Read moreSource§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Source§fn flatten_unordered(
self,
limit: impl Into<Option<usize>>,
) -> FlattenUnorderedWithFlowController<Self, ()>
fn flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> FlattenUnorderedWithFlowController<Self, ()>
Source§fn flat_map_unordered<U, F>(
self,
limit: impl Into<Option<usize>>,
f: F,
) -> FlatMapUnordered<Self, U, F>
fn flat_map_unordered<U, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> FlatMapUnordered<Self, U, F>
StreamExt::map
but flattens nested Stream
s
and polls them concurrently, yielding items in any order, as they made
available. Read moreSource§fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
StreamExt::fold
that holds internal state
and produces a new stream. Read moreSource§fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
true
. Read moreSource§fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
true
. Read moreSource§fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
Source§fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘ
fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘ
Source§fn for_each_concurrent<Fut, F>(
self,
limit: impl Into<Option<usize>>,
f: F,
) -> ForEachConcurrent<Self, Fut, F> ⓘ
fn for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> ForEachConcurrent<Self, Fut, F> ⓘ
Source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n
items of the underlying stream. Read moreSource§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n
items of the underlying stream. Read moreSource§fn catch_unwind(self) -> CatchUnwind<Self>where
Self: Sized + UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self>where
Self: Sized + UnwindSafe,
Source§fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
Source§fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>where
Self: Sized + 'a,
Source§fn buffered(self, n: usize) -> Buffered<Self>
fn buffered(self, n: usize) -> Buffered<Self>
Source§fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
Source§fn zip<St>(self, other: St) -> Zip<Self, St>
fn zip<St>(self, other: St) -> Zip<Self, St>
Source§fn peekable(self) -> Peekable<Self>where
Self: Sized,
fn peekable(self) -> Peekable<Self>where
Self: Sized,
peek
method. Read moreSource§fn chunks(self, capacity: usize) -> Chunks<Self>where
Self: Sized,
fn chunks(self, capacity: usize) -> Chunks<Self>where
Self: Sized,
Source§fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
Self: Sized,
fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
Self: Sized,
Source§fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘ
fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘ
Source§fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)
fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)
Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Source§fn left_stream<B>(self) -> Either<Self, B> ⓘ
fn left_stream<B>(self) -> Either<Self, B> ⓘ
Source§fn right_stream<B>(self) -> Either<B, Self> ⓘ
fn right_stream<B>(self) -> Either<B, Self> ⓘ
Source§fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
Stream::poll_next
on Unpin
stream types.Source§fn select_next_some(&mut self) -> SelectNextSome<'_, Self> ⓘwhere
Self: Unpin + FusedStream,
fn select_next_some(&mut self) -> SelectNextSome<'_, Self> ⓘwhere
Self: Unpin + FusedStream,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.