Struct futures::stream::futures_unordered::FuturesUnordered
source · pub struct FuturesUnordered<Fut> { /* private fields */ }
Expand description
A set of futures which may complete in any order.
See FuturesOrdered
for a version of this
type that preserves a FIFO order.
This structure is optimized to manage a large number of futures.
Futures managed by FuturesUnordered
will only be polled when they
generate wake-up notifications. This reduces the required amount of work
needed to poll large numbers of futures.
FuturesUnordered
can be filled by collect
ing an
iterator of futures into a FuturesUnordered
, or by
push
ing futures onto an existing
FuturesUnordered
. When new futures are added,
poll_next
must be called in order to begin receiving
wake-ups for new futures.
Note that you can create a ready-made FuturesUnordered
via the
collect
method, or you can start with an empty set
with the FuturesUnordered::new
constructor.
This type is only available when the std
or alloc
feature of this
library is activated, and it is activated by default.
Implementations§
source§impl<Fut> FuturesUnordered<Fut>
impl<Fut> FuturesUnordered<Fut>
sourcepub fn new() -> FuturesUnordered<Fut>
pub fn new() -> FuturesUnordered<Fut>
Constructs a new, empty FuturesUnordered
.
The returned FuturesUnordered
does not contain any futures.
In this state, FuturesUnordered::poll_next
will
return Poll::Ready(None)
.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of futures contained in the set.
This represents the total number of in-flight futures.
sourcepub fn push(&self, future: Fut)
pub fn push(&self, future: Fut)
Push a future into the set.
This method adds the given future to the set. This method will not
call poll
on the submitted future. The caller must
ensure that FuturesUnordered::poll_next
is called
in order to receive wake-up notifications for the given future.
sourcepub fn iter(&self) -> Iter<'_, Fut> ⓘwhere
Fut: Unpin,
pub fn iter(&self) -> Iter<'_, Fut> ⓘwhere Fut: Unpin,
Returns an iterator that allows inspecting each future in the set.
sourcepub fn iter_pin_ref(self: Pin<&FuturesUnordered<Fut>>) -> IterPinRef<'_, Fut> ⓘ
pub fn iter_pin_ref(self: Pin<&FuturesUnordered<Fut>>) -> IterPinRef<'_, Fut> ⓘ
Returns an iterator that allows inspecting each future in the set.
sourcepub fn iter_mut(&mut self) -> IterMut<'_, Fut> ⓘwhere
Fut: Unpin,
pub fn iter_mut(&mut self) -> IterMut<'_, Fut> ⓘwhere Fut: Unpin,
Returns an iterator that allows modifying each future in the set.
sourcepub fn iter_pin_mut(
self: Pin<&mut FuturesUnordered<Fut>>
) -> IterPinMut<'_, Fut> ⓘ
pub fn iter_pin_mut( self: Pin<&mut FuturesUnordered<Fut>> ) -> IterPinMut<'_, Fut> ⓘ
Returns an iterator that allows modifying each future in the set.
source§impl<Fut> FuturesUnordered<Fut>
impl<Fut> FuturesUnordered<Fut>
Trait Implementations§
source§impl<Fut> Debug for FuturesUnordered<Fut>
impl<Fut> Debug for FuturesUnordered<Fut>
source§impl<Fut> Default for FuturesUnordered<Fut>
impl<Fut> Default for FuturesUnordered<Fut>
source§fn default() -> FuturesUnordered<Fut>
fn default() -> FuturesUnordered<Fut>
source§impl<Fut> Drop for FuturesUnordered<Fut>
impl<Fut> Drop for FuturesUnordered<Fut>
source§impl<Fut> Extend<Fut> for FuturesUnordered<Fut>
impl<Fut> Extend<Fut> for FuturesUnordered<Fut>
source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Fut>,
fn extend<I>(&mut self, iter: I)where I: IntoIterator<Item = Fut>,
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl<Fut> FromIterator<Fut> for FuturesUnordered<Fut>
impl<Fut> FromIterator<Fut> for FuturesUnordered<Fut>
source§fn from_iter<I>(iter: I) -> FuturesUnordered<Fut>where
I: IntoIterator<Item = Fut>,
fn from_iter<I>(iter: I) -> FuturesUnordered<Fut>where I: IntoIterator<Item = Fut>,
source§impl<Fut> FusedStream for FuturesUnordered<Fut>where
Fut: Future,
impl<Fut> FusedStream for FuturesUnordered<Fut>where Fut: Future,
source§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
true
if the stream should no longer be polled.source§impl<'a, Fut> IntoIterator for &'a FuturesUnordered<Fut>where
Fut: Unpin,
impl<'a, Fut> IntoIterator for &'a FuturesUnordered<Fut>where Fut: Unpin,
source§impl<'a, Fut> IntoIterator for &'a mut FuturesUnordered<Fut>where
Fut: Unpin,
impl<'a, Fut> IntoIterator for &'a mut FuturesUnordered<Fut>where Fut: Unpin,
§type Item = &'a mut Fut
type Item = &'a mut Fut
source§fn into_iter(self) -> <&'a mut FuturesUnordered<Fut> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut FuturesUnordered<Fut> as IntoIterator>::IntoIter
source§impl<Fut> IntoIterator for FuturesUnordered<Fut>where
Fut: Unpin,
impl<Fut> IntoIterator for FuturesUnordered<Fut>where Fut: Unpin,
source§impl LocalSpawn for FuturesUnordered<LocalFutureObj<'_, ()>>
impl LocalSpawn for FuturesUnordered<LocalFutureObj<'_, ()>>
source§fn spawn_local_obj(
&self,
future_obj: LocalFutureObj<'static, ()>
) -> Result<(), SpawnError>
fn spawn_local_obj( &self, future_obj: LocalFutureObj<'static, ()> ) -> Result<(), SpawnError>
source§fn status_local(&self) -> Result<(), SpawnError>
fn status_local(&self) -> Result<(), SpawnError>
source§impl<Fut> Stream for FuturesUnordered<Fut>where
Fut: Future,
impl<Fut> Stream for FuturesUnordered<Fut>where Fut: Future,
source§fn poll_next(
self: Pin<&mut FuturesUnordered<Fut>>,
cx: &mut Context<'_>
) -> Poll<Option<<FuturesUnordered<Fut> as Stream>::Item>>
fn poll_next( self: Pin<&mut FuturesUnordered<Fut>>, cx: &mut Context<'_> ) -> Poll<Option<<FuturesUnordered<Fut> as Stream>::Item>>
None
if the stream is exhausted. Read moreimpl<Fut> Send for FuturesUnordered<Fut>where Fut: Send,
impl<Fut> Sync for FuturesUnordered<Fut>where Fut: Send + Sync,
impl<Fut> Unpin for FuturesUnordered<Fut>
Auto Trait Implementations§
impl<Fut> !RefUnwindSafe for FuturesUnordered<Fut>
impl<Fut> !UnwindSafe for FuturesUnordered<Fut>
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<Sp> LocalSpawnExt for Spwhere
Sp: LocalSpawn + ?Sized,
impl<Sp> LocalSpawnExt for Spwhere Sp: LocalSpawn + ?Sized,
source§fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>where
Fut: Future<Output = ()> + 'static,
fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>where Fut: Future<Output = ()> + 'static,
()
to
completion. Read moresource§fn spawn_local_with_handle<Fut>(
&self,
future: Fut
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where
Fut: Future + 'static,
fn spawn_local_with_handle<Fut>( &self, future: Fut ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where Fut: Future + 'static,
source§impl<Sp> SpawnExt for Spwhere
Sp: Spawn + ?Sized,
impl<Sp> SpawnExt for Spwhere Sp: Spawn + ?Sized,
source§fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>where
Fut: Future<Output = ()> + Send + 'static,
fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>where Fut: Future<Output = ()> + Send + 'static,
()
to
completion. Read moresource§fn spawn_with_handle<Fut>(
&self,
future: Fut
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where
Fut: Future + Send + 'static,
<Fut as Future>::Output: Send,
fn spawn_with_handle<Fut>( &self, future: Fut ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where Fut: Future + Send + 'static, <Fut as Future>::Output: Send,
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>(self) -> Collect<Self, C> ⓘwhere
C: Default + Extend<Self::Item>,
Self: Sized,
fn collect<C>(self) -> Collect<Self, C> ⓘwhere C: Default + Extend<Self::Item>, 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::Item as IntoIterator>::Item> + IntoIterator + Default,
fn concat(self) -> Concat<Self> ⓘwhere Self: Sized, Self::Item: Extend<<Self::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>>
) -> FlattenUnorderedWithFlowController<Self, ()>where
Self::Item: Stream + Unpin,
Self: Sized,
fn flatten_unordered( self, limit: impl Into<Option<usize>> ) -> FlattenUnorderedWithFlowController<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 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, Global>>where
Self: Sized + Send + 'a,
fn boxed<'a>( self ) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a, Global>>where Self: Sized + Send + 'a,
source§fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>>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 forward<S>(self, sink: S) -> Forward<Self, S> ⓘwhere
S: Sink<Self::Ok, Error = Self::Error>,
Self: TryStream + Sized,
fn forward<S>(self, sink: S) -> Forward<Self, S> ⓘwhere S: Sink<Self::Ok, Error = Self::Error>, Self: TryStream + Sized,
source§fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)where
Self: Sink<Item> + Sized,
fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)where Self: Sink<Item> + 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.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,
source§impl<S> TryStreamExt for Swhere
S: TryStream + ?Sized,
impl<S> TryStreamExt for Swhere S: TryStream + ?Sized,
source§fn err_into<E>(self) -> ErrInto<Self, E>where
Self: Sized,
Self::Error: Into<E>,
fn err_into<E>(self) -> ErrInto<Self, E>where Self: Sized, Self::Error: Into<E>,
source§fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>where
Self: Sized,
F: FnMut(Self::Ok) -> T,
fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>where Self: Sized, F: FnMut(Self::Ok) -> T,
source§fn map_err<E, F>(self, f: F) -> MapErr<Self, F>where
Self: Sized,
F: FnMut(Self::Error) -> E,
fn map_err<E, F>(self, f: F) -> MapErr<Self, F>where Self: Sized, F: FnMut(Self::Error) -> E,
source§fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>where
F: FnMut(Self::Ok) -> Fut,
Fut: TryFuture<Error = Self::Error>,
Self: Sized,
fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>where F: FnMut(Self::Ok) -> Fut, Fut: TryFuture<Error = Self::Error>, Self: Sized,
f
. Read moresource§fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>where
F: FnMut(Self::Error) -> Fut,
Fut: TryFuture<Ok = Self::Ok>,
Self: Sized,
fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>where F: FnMut(Self::Error) -> Fut, Fut: TryFuture<Ok = Self::Ok>, Self: Sized,
f
. Read moresource§fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>where
F: FnMut(&Self::Ok),
Self: Sized,
fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>where F: FnMut(&Self::Ok), Self: Sized,
source§fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>where
F: FnMut(&Self::Error),
Self: Sized,
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>where F: FnMut(&Self::Error), Self: Sized,
source§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where Self: Sized,
source§fn try_next(&mut self) -> TryNext<'_, Self> ⓘwhere
Self: Unpin,
fn try_next(&mut self) -> TryNext<'_, Self> ⓘwhere Self: Unpin,
source§fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F> ⓘwhere
F: FnMut(Self::Ok) -> Fut,
Fut: TryFuture<Ok = (), Error = Self::Error>,
Self: Sized,
fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F> ⓘwhere F: FnMut(Self::Ok) -> Fut, Fut: TryFuture<Ok = (), Error = Self::Error>, Self: Sized,
source§fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>where
F: FnMut(&Self::Ok) -> Fut,
Fut: TryFuture<Ok = bool, Error = Self::Error>,
Self: Sized,
fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>where F: FnMut(&Self::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = Self::Error>, Self: Sized,
true
. Read moresource§fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>where
F: FnMut(&Self::Ok) -> Fut,
Fut: TryFuture<Ok = bool, Error = Self::Error>,
Self: Sized,
fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>where F: FnMut(&Self::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = Self::Error>, Self: Sized,
true
. Read moresource§fn try_for_each_concurrent<Fut, F>(
self,
limit: impl Into<Option<usize>>,
f: F
) -> TryForEachConcurrent<Self, Fut, F> ⓘwhere
F: FnMut(Self::Ok) -> Fut,
Fut: Future<Output = Result<(), Self::Error>>,
Self: Sized,
fn try_for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F ) -> TryForEachConcurrent<Self, Fut, F> ⓘwhere F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = Result<(), Self::Error>>, Self: Sized,
source§fn try_collect<C>(self) -> TryCollect<Self, C> ⓘwhere
C: Default + Extend<Self::Ok>,
Self: Sized,
fn try_collect<C>(self) -> TryCollect<Self, C> ⓘwhere C: Default + Extend<Self::Ok>, Self: Sized,
source§fn try_chunks(self, capacity: usize) -> TryChunks<Self>where
Self: Sized,
fn try_chunks(self, capacity: usize) -> TryChunks<Self>where Self: Sized,
source§fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>where
Self: Sized,
fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>where Self: Sized,
source§fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>where
Fut: Future<Output = bool>,
F: FnMut(&Self::Ok) -> Fut,
Self: Sized,
fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>where Fut: Future<Output = bool>, F: FnMut(&Self::Ok) -> Fut, Self: Sized,
source§fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>where
Fut: TryFuture<Ok = Option<T>, Error = Self::Error>,
F: FnMut(Self::Ok) -> Fut,
Self: Sized,
fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>where Fut: TryFuture<Ok = Option<T>, Error = Self::Error>, F: FnMut(Self::Ok) -> Fut, Self: Sized,
source§fn try_flatten_unordered(
self,
limit: impl Into<Option<usize>>
) -> TryFlattenUnordered<Self>where
Self::Ok: TryStream + Unpin,
<Self::Ok as TryStream>::Error: From<Self::Error>,
Self: Sized,
fn try_flatten_unordered( self, limit: impl Into<Option<usize>> ) -> TryFlattenUnordered<Self>where Self::Ok: TryStream + Unpin, <Self::Ok as TryStream>::Error: From<Self::Error>, Self: Sized,
source§fn try_flatten(self) -> TryFlatten<Self>where
Self::Ok: TryStream,
<Self::Ok as TryStream>::Error: From<Self::Error>,
Self: Sized,
fn try_flatten(self) -> TryFlatten<Self>where Self::Ok: TryStream, <Self::Ok as TryStream>::Error: From<Self::Error>, Self: Sized,
source§fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F> ⓘwhere
F: FnMut(T, Self::Ok) -> Fut,
Fut: TryFuture<Ok = T, Error = Self::Error>,
Self: Sized,
fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F> ⓘwhere F: FnMut(T, Self::Ok) -> Fut, Fut: TryFuture<Ok = T, Error = Self::Error>, Self: Sized,
source§fn try_concat(self) -> TryConcat<Self> ⓘwhere
Self: Sized,
Self::Ok: Extend<<Self::Ok as IntoIterator>::Item> + IntoIterator + Default,
fn try_concat(self) -> TryConcat<Self> ⓘwhere Self: Sized, Self::Ok: Extend<<Self::Ok as IntoIterator>::Item> + IntoIterator + Default,
source§fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>where
Self::Ok: TryFuture<Error = Self::Error>,
Self: Sized,
fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>where Self::Ok: TryFuture<Error = Self::Error>, Self: Sized,
source§fn try_buffered(self, n: usize) -> TryBuffered<Self>where
Self::Ok: TryFuture<Error = Self::Error>,
Self: Sized,
fn try_buffered(self, n: usize) -> TryBuffered<Self>where Self::Ok: TryFuture<Error = Self::Error>, Self: Sized,
source§fn try_poll_next_unpin(
&mut self,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Ok, Self::Error>>>where
Self: Unpin,
fn try_poll_next_unpin( &mut self, cx: &mut Context<'_> ) -> Poll<Option<Result<Self::Ok, Self::Error>>>where Self: Unpin,
TryStream::try_poll_next
on Unpin
stream types.source§fn into_async_read(self) -> IntoAsyncRead<Self>where
Self: Sized + TryStreamExt<Error = Error>,
Self::Ok: AsRef<[u8]>,
fn into_async_read(self) -> IntoAsyncRead<Self>where Self: Sized + TryStreamExt<Error = Error>, Self::Ok: AsRef<[u8]>,
AsyncBufRead
. Read moresource§fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F> ⓘwhere
Self: Sized,
F: FnMut(Self::Ok) -> Fut,
Fut: Future<Output = bool>,
fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F> ⓘwhere Self: Sized, F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = bool>,
Err
is encountered or if an Ok
item is found
that does not satisfy the predicate. Read moresource§fn try_any<Fut, F>(self, f: F) -> TryAny<Self, Fut, F> ⓘwhere
Self: Sized,
F: FnMut(Self::Ok) -> Fut,
Fut: Future<Output = bool>,
fn try_any<Fut, F>(self, f: F) -> TryAny<Self, Fut, F> ⓘwhere Self: Sized, F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = bool>,
Err
is encountered or if an Ok
item is found
that satisfies the predicate. Read more