Struct futures_util::stream::TryFlattenUnordered
source · pub struct TryFlattenUnordered<St>where
St: TryStream,
St::Ok: TryStream + Unpin,
<St::Ok as TryStream>::Error: From<St::Error>,{ /* private fields */ }
Expand description
Stream for the try_flatten_unordered
method.
Implementations§
source§impl<St> TryFlattenUnordered<St>where
St: TryStream,
St::Ok: TryStream + Unpin,
<St::Ok as TryStream>::Error: From<St::Error>,
impl<St> TryFlattenUnordered<St>where St: TryStream, St::Ok: TryStream + Unpin, <St::Ok as TryStream>::Error: From<St::Error>,
sourcepub fn get_ref(&self) -> &St
pub fn get_ref(&self) -> &St
Acquires a reference to the underlying sink or stream that this combinator is pulling from.
sourcepub fn get_mut(&mut self) -> &mut St
pub fn get_mut(&mut self) -> &mut St
Acquires a mutable reference to the underlying sink or stream that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.
sourcepub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut St>
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut St>
Acquires a pinned mutable reference to the underlying sink or stream that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.
sourcepub fn into_inner(self) -> St
pub fn into_inner(self) -> St
Consumes this combinator, returning the underlying sink or stream.
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<St> Debug for TryFlattenUnordered<St>where
FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>>: Debug,
St: TryStream,
St::Ok: TryStream + Unpin,
<St::Ok as TryStream>::Error: From<St::Error>,
impl<St> Debug for TryFlattenUnordered<St>where FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>>: Debug, St: TryStream, St::Ok: TryStream + Unpin, <St::Ok as TryStream>::Error: From<St::Error>,
source§impl<St> FusedStream for TryFlattenUnordered<St>where
FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>>: FusedStream,
St: TryStream,
St::Ok: TryStream + Unpin,
<St::Ok as TryStream>::Error: From<St::Error>,
impl<St> FusedStream for TryFlattenUnordered<St>where FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>>: FusedStream, St: TryStream, St::Ok: TryStream + Unpin, <St::Ok as TryStream>::Error: From<St::Error>,
source§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
true
if the stream should no longer be polled.source§impl<St> Stream for TryFlattenUnordered<St>where
FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>>: Stream,
St: TryStream,
St::Ok: TryStream + Unpin,
<St::Ok as TryStream>::Error: From<St::Error>,
impl<St> Stream for TryFlattenUnordered<St>where FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>>: Stream, St: TryStream, St::Ok: TryStream + Unpin, <St::Ok as TryStream>::Error: From<St::Error>,
§type Item = <FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>> as Stream>::Item
type Item = <FlattenUnorderedWithFlowController<NestedTryStreamIntoEitherTryStream<St>, PropagateBaseStreamError<St>> as Stream>::Item
impl<'__pin, St> Unpin for TryFlattenUnordered<St>where __Origin<'__pin, St>: Unpin, St: TryStream, St::Ok: TryStream + Unpin, <St::Ok as TryStream>::Error: From<St::Error>,
Auto Trait Implementations§
impl<St> !RefUnwindSafe for TryFlattenUnordered<St>
impl<St> Send for TryFlattenUnordered<St>where St: Send, <<St as TryStream>::Ok as TryStream>::Error: Send, <St as TryStream>::Ok: Send, <<St as TryStream>::Ok as TryStream>::Ok: Send,
impl<St> Sync for TryFlattenUnordered<St>where St: Sync, <<St as TryStream>::Ok as TryStream>::Error: Send + Sync, <St as TryStream>::Ok: Send + Sync, <<St as TryStream>::Ok as TryStream>::Ok: Send + Sync,
impl<St> !UnwindSafe for TryFlattenUnordered<St>
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 Twhere
T: Stream + ?Sized,
impl<T> StreamExt for Twhere T: Stream + ?Sized,
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> ⓘwhere
Self: Sized + Unpin,
fn into_future(self) -> StreamFuture<Self> ⓘwhere Self: Sized + Unpin,
source§fn map<T, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> T,
Self: Sized,
fn map<T, F>(self, f: F) -> Map<Self, F>where F: FnMut(Self::Item) -> T, Self: Sized,
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>where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
source§fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = Option<T>>,
Self: Sized,
fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = Option<T>>, Self: Sized,
source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>where
F: FnMut(Self::Item) -> Fut,
Fut: Future,
Self: Sized,
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>where F: FnMut(Self::Item) -> Fut, Fut: Future, Self: Sized,
source§fn collect<C: Default + Extend<Self::Item>>(self) -> Collect<Self, C> ⓘwhere
Self: Sized,
fn collect<C: Default + Extend<Self::Item>>(self) -> Collect<Self, C> ⓘwhere Self: Sized,
source§fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘwhere
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Self: Sized + Stream<Item = (A, B)>,
fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> ⓘwhere FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Stream<Item = (A, B)>,
source§fn concat(self) -> Concat<Self> ⓘwhere
Self: Sized,
Self::Item: Extend<<<Self as Stream>::Item as IntoIterator>::Item> + IntoIterator + Default,
fn concat(self) -> Concat<Self> ⓘwhere Self: Sized, Self::Item: Extend<<<Self as Stream>::Item as IntoIterator>::Item> + IntoIterator + Default,
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> ⓘwhere
F: FnMut(T, Self::Item) -> Fut,
Fut: Future<Output = T>,
Self: Sized,
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>, Self: Sized,
source§fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘwhere
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> ⓘwhere F: FnMut(Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
true
if any element in stream satisfied a predicate. Read moresource§fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> ⓘwhere
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> ⓘwhere F: FnMut(Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
true
if all element in stream satisfied a predicate. Read moresource§fn flatten(self) -> Flatten<Self>where
Self::Item: Stream,
Self: Sized,
fn flatten(self) -> Flatten<Self>where Self::Item: Stream, Self: Sized,
source§fn flatten_unordered(
self,
limit: impl Into<Option<usize>>
) -> FlattenUnordered<Self>where
Self::Item: Stream + Unpin,
Self: Sized,
fn flatten_unordered( self, limit: impl Into<Option<usize>> ) -> FlattenUnordered<Self>where Self::Item: Stream + Unpin, Self: Sized,
source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where
F: FnMut(Self::Item) -> U,
U: Stream,
Self: Sized,
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where F: FnMut(Self::Item) -> U, U: Stream, Self: Sized,
source§fn flat_map_unordered<U, F>(
self,
limit: impl Into<Option<usize>>,
f: F
) -> FlatMapUnordered<Self, U, F>where
U: Stream + Unpin,
F: FnMut(Self::Item) -> U,
Self: Sized,
fn flat_map_unordered<U, F>( self, limit: impl Into<Option<usize>>, f: F ) -> FlatMapUnordered<Self, U, F>where U: Stream + Unpin, F: FnMut(Self::Item) -> U, Self: Sized,
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>where
F: FnMut(&mut S, Self::Item) -> Fut,
Fut: Future<Output = Option<B>>,
Self: Sized,
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>>, Self: Sized,
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>where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
true
. Read moresource§fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Self: Sized,
fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,
true
. Read moresource§fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>where
Fut: Future,
Self: Sized,
fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>where Fut: Future, Self: Sized,
source§fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘwhere
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
Self: Sized,
fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> ⓘwhere F: FnMut(Self::Item) -> Fut, Fut: Future<Output = ()>, Self: Sized,
source§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 = ()>,
Self: Sized,
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 = ()>, Self: Sized,
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 boxed<'a>(self) -> BoxStream<'a, Self::Item>where
Self: Sized + Send + 'a,
fn boxed<'a>(self) -> BoxStream<'a, Self::Item>where Self: Sized + Send + 'a,
source§fn boxed_local<'a>(self) -> LocalBoxStream<'a, Self::Item>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> LocalBoxStream<'a, Self::Item>where Self: Sized + 'a,
source§fn buffered(self, n: usize) -> Buffered<Self>where
Self::Item: Future,
Self: Sized,
fn buffered(self, n: usize) -> Buffered<Self>where Self::Item: Future, Self: Sized,
source§fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>where
Self::Item: Future,
Self: Sized,
fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>where Self::Item: Future, Self: Sized,
source§fn zip<St>(self, other: St) -> Zip<Self, St>where
St: Stream,
Self: Sized,
fn zip<St>(self, other: St) -> Zip<Self, St>where St: Stream, Self: Sized,
source§fn chain<St>(self, other: St) -> Chain<Self, St>where
St: Stream<Item = Self::Item>,
Self: Sized,
fn chain<St>(self, other: St) -> Chain<Self, St>where St: Stream<Item = Self::Item>, Self: Sized,
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 inspect<F>(self, f: F) -> Inspect<Self, F>where
F: FnMut(&Self::Item),
Self: Sized,
fn inspect<F>(self, f: F) -> Inspect<Self, F>where F: FnMut(&Self::Item), Self: Sized,
source§fn right_stream<B>(self) -> Either<B, Self> ⓘwhere
B: Stream<Item = Self::Item>,
Self: Sized,
fn right_stream<B>(self) -> Either<B, Self> ⓘwhere B: Stream<Item = Self::Item>, Self: Sized,
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.