Struct futures::stream::Zip [−][src]
Stream for the zip
method.
Implementations
impl<St1, St2> Zip<St1, St2> where
St1: Stream,
St2: Stream,
[src]
St1: Stream,
St2: Stream,
pub fn get_ref(&self) -> (&St1, &St2)
[src]
Acquires a reference to the underlying streams that this combinator is pulling from.
pub fn get_mut(&mut self) -> (&mut St1, &mut St2)
[src]
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.
pub fn get_pin_mut(
self: Pin<&mut Zip<St1, St2>>
) -> (Pin<&mut St1>, Pin<&mut St2>)
[src]
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.
pub fn into_inner(self) -> (St1, St2)
[src]
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
impl<St1, St2> Debug for Zip<St1, St2> where
St1: Debug + Stream,
St2: Debug + Stream,
<St1 as Stream>::Item: Debug,
<St2 as Stream>::Item: Debug,
[src]
St1: Debug + Stream,
St2: Debug + Stream,
<St1 as Stream>::Item: Debug,
<St2 as Stream>::Item: Debug,
impl<St1, St2> FusedStream for Zip<St1, St2> where
St1: Stream,
St2: Stream,
[src]
St1: Stream,
St2: Stream,
pub fn is_terminated(&self) -> bool
[src]
impl<St1, St2> Stream for Zip<St1, St2> where
St1: Stream,
St2: Stream,
[src]
St1: Stream,
St2: Stream,
type Item = (<St1 as Stream>::Item, <St2 as Stream>::Item)
Values yielded by the stream.
pub fn poll_next(
self: Pin<&mut Zip<St1, St2>>,
cx: &mut Context<'_>
) -> Poll<Option<<Zip<St1, St2> as Stream>::Item>>
[src]
self: Pin<&mut Zip<St1, St2>>,
cx: &mut Context<'_>
) -> Poll<Option<<Zip<St1, St2> as Stream>::Item>>
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
impl<'__pin, St1, St2> Unpin for Zip<St1, St2> where
St1: Stream,
St2: Stream,
__Origin<'__pin, St1, St2>: Unpin,
[src]
St1: Stream,
St2: Stream,
__Origin<'__pin, St1, St2>: Unpin,
Auto Trait Implementations
impl<St1, St2> RefUnwindSafe for Zip<St1, St2> where
St1: RefUnwindSafe,
St2: RefUnwindSafe,
<St1 as Stream>::Item: RefUnwindSafe,
<St2 as Stream>::Item: RefUnwindSafe,
St1: RefUnwindSafe,
St2: RefUnwindSafe,
<St1 as Stream>::Item: RefUnwindSafe,
<St2 as Stream>::Item: RefUnwindSafe,
impl<St1, St2> Send for Zip<St1, St2> where
St1: Send,
St2: Send,
<St1 as Stream>::Item: Send,
<St2 as Stream>::Item: Send,
St1: Send,
St2: Send,
<St1 as Stream>::Item: Send,
<St2 as Stream>::Item: Send,
impl<St1, St2> Sync for Zip<St1, St2> where
St1: Sync,
St2: Sync,
<St1 as Stream>::Item: Sync,
<St2 as Stream>::Item: Sync,
St1: Sync,
St2: Sync,
<St1 as Stream>::Item: Sync,
<St2 as Stream>::Item: Sync,
impl<St1, St2> UnwindSafe for Zip<St1, St2> where
St1: UnwindSafe,
St2: UnwindSafe,
<St1 as Stream>::Item: UnwindSafe,
<St2 as Stream>::Item: UnwindSafe,
St1: UnwindSafe,
St2: UnwindSafe,
<St1 as Stream>::Item: UnwindSafe,
<St2 as Stream>::Item: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StreamExt for T where
T: Stream + ?Sized,
[src]
T: Stream + ?Sized,
pub fn next(&mut self) -> Next<'_, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub fn into_future(self) -> StreamFuture<Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
pub fn map<T, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> T,
[src]
F: FnMut(Self::Item) -> T,
pub fn enumerate(self) -> Enumerate<Self>
[src]
pub fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F> where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
[src]
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
pub fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F> where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = Option<T>>,
[src]
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = Option<T>>,
pub fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> where
F: FnMut(Self::Item) -> Fut,
Fut: Future,
[src]
F: FnMut(Self::Item) -> Fut,
Fut: Future,
pub fn collect<C>(self) -> Collect<Self, C>ⓘ where
C: Default + Extend<Self::Item>,
[src]
C: Default + Extend<Self::Item>,
pub fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB>ⓘ where
Self: Stream<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
[src]
Self: Stream<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
pub fn concat(self) -> Concat<Self>ⓘ where
Self::Item: Extend<<Self::Item as IntoIterator>::Item>,
Self::Item: IntoIterator,
Self::Item: Default,
[src]
Self::Item: Extend<<Self::Item as IntoIterator>::Item>,
Self::Item: IntoIterator,
Self::Item: Default,
pub fn cycle(self) -> Cycle<Self> where
Self: Clone,
[src]
Self: Clone,
pub fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F>ⓘ where
F: FnMut(T, Self::Item) -> Fut,
Fut: Future<Output = T>,
[src]
F: FnMut(T, Self::Item) -> Fut,
Fut: Future<Output = T>,
pub fn flatten(self) -> Flatten<Self> where
Self::Item: Stream,
[src]
Self::Item: Stream,
pub fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where
F: FnMut(Self::Item) -> U,
U: Stream,
[src]
F: FnMut(Self::Item) -> U,
U: Stream,
pub fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F> where
F: FnMut(&mut S, Self::Item) -> Fut,
Fut: Future<Output = Option<B>>,
[src]
F: FnMut(&mut S, Self::Item) -> Fut,
Fut: Future<Output = Option<B>>,
pub fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F> where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
[src]
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
pub fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F> where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
[src]
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
pub fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut> where
Fut: Future,
[src]
Fut: Future,
pub fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F>ⓘ where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
[src]
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
pub fn for_each_concurrent<Fut, F>(
self,
limit: impl Into<Option<usize>>,
f: F
) -> ForEachConcurrent<Self, Fut, F>ⓘ where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
[src]
self,
limit: impl Into<Option<usize>>,
f: F
) -> ForEachConcurrent<Self, Fut, F>ⓘ where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
pub fn take(self, n: usize) -> Take<Self>
[src]
pub fn skip(self, n: usize) -> Skip<Self>
[src]
pub fn fuse(self) -> Fuse<Self>
[src]
pub fn by_ref(&mut self) -> &mut Selfⓘ
[src]
pub fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe,
[src]
Self: UnwindSafe,
pub fn boxed<'a>(
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a + Send, Global>>ⓘ where
Self: Send + 'a,
[src]
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a + Send, Global>>ⓘ where
Self: Send + 'a,
pub fn boxed_local<'a>(
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>>ⓘ where
Self: 'a,
[src]
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>>ⓘ where
Self: 'a,
pub fn buffered(self, n: usize) -> Buffered<Self> where
Self::Item: Future,
[src]
Self::Item: Future,
pub fn buffer_unordered(self, n: usize) -> BufferUnordered<Self> where
Self::Item: Future,
[src]
Self::Item: Future,
pub fn zip<St>(self, other: St) -> Zip<Self, St> where
St: Stream,
[src]
St: Stream,
pub fn chain<St>(self, other: St) -> Chain<Self, St> where
St: Stream<Item = Self::Item>,
[src]
St: Stream<Item = Self::Item>,
pub fn peekable(self) -> Peekable<Self>
[src]
pub fn chunks(self, capacity: usize) -> Chunks<Self>
[src]
pub fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
[src]
pub fn forward<S>(self, sink: S) -> Forward<Self, S>ⓘ where
Self: TryStream,
S: Sink<Self::Ok, Error = Self::Error>,
[src]
Self: TryStream,
S: Sink<Self::Ok, Error = Self::Error>,
pub fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>) where
Self: Sink<Item>,
[src]
Self: Sink<Item>,
pub fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
[src]
F: FnMut(&Self::Item),
pub fn left_stream<B>(self) -> Either<Self, B>ⓘ where
B: Stream<Item = Self::Item>,
[src]
B: Stream<Item = Self::Item>,
pub fn right_stream<B>(self) -> Either<B, Self>ⓘ where
B: Stream<Item = Self::Item>,
[src]
B: Stream<Item = Self::Item>,
pub fn poll_next_unpin(
&mut self,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>> where
Self: Unpin,
[src]
&mut self,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>> where
Self: Unpin,
pub fn select_next_some(&mut self) -> SelectNextSome<'_, Self>ⓘNotable traits for SelectNextSome<'_, St>
impl<'_, St> Future for SelectNextSome<'_, St> where
St: Unpin + FusedStream + ?Sized, type Output = <St as Stream>::Item;
where
Self: Unpin + FusedStream,
[src]
Notable traits for SelectNextSome<'_, St>
impl<'_, St> Future for SelectNextSome<'_, St> where
St: Unpin + FusedStream + ?Sized, type Output = <St as Stream>::Item;
Self: Unpin + FusedStream,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,