Module futures_util::stream 
source · Expand description
Asynchronous streams.
This module contains:
- The Streamtrait, for objects that can asynchronously produce a sequence of values.
- The StreamExtandTryStreamExttrait, which provides adapters for chaining and composing streams.
- Top-level stream constructors like iterwhich creates a stream from an iterator.
Modules§
- An unbounded set of futures.
- An unbounded set of streams
Structs§
- A handle to anAbortabletask.
- A registration handle for anAbortabletask. Values of this type can be acquired fromAbortHandle::newand are used in calls toAbortable::new.
- A future/stream which can be remotely short-circuited using anAbortHandle.
- Indicator that theAbortabletask was aborted.
- Future for theallmethod.
- Stream for theand_thenmethod.
- Future for theanymethod.
- Stream for thebuffer_unorderedmethod.
- Stream for thebufferedmethod.
- Stream for thecatch_unwindmethod.
- Stream for thechainmethod.
- Stream for thechunksmethod.
- Future for thecollectmethod.
- Future for theconcatmethod.
- Future for thecountmethod.
- Stream for thecyclemethod.
- Stream for theemptyfunction.
- Stream for theenumeratemethod.
- Stream for theerr_intomethod.
- Stream for thefiltermethod.
- Stream for thefilter_mapmethod.
- Stream for theflat_mapmethod.
- Stream for theflat_map_unorderedmethod.
- Stream for theflattenmethod.
- Future for thefoldmethod.
- Future for thefor_eachmethod.
- Future for thefor_each_concurrentmethod.
- Future for theforwardmethod.
- Stream for thefusemethod.
- An unbounded queue of futures.
- A set of futures which may complete in any order.
- Stream for theinspectmethod.
- Stream for theinspect_errmethod.
- Stream for theinspect_okmethod.
- Reader for theinto_async_readmethod.
- Stream for theinto_streammethod.
- Stream for theiterfunction.
- Stream for themapmethod.
- Stream for themap_errmethod.
- Stream for themap_okmethod.
- Future for thenextmethod.
- Future for thePeekable::next_ifmethod.
- Future for thePeekable::next_if_eqmethod.
- A stream which emits single element and then EOF.
- Stream for theor_elsemethod.
- Future for thePeekable::peekmethod.
- Future for thePeekable::peek_mutmethod.
- AStreamthat implements apeekmethod.
- Stream for thepending()function.
- Stream for thepoll_fnfunction.
- Stream for the poll_immediate function.
- Stream for theready_chunksmethod.
- Stream for therepeatfunction.
- An stream that repeats elements of typeAendlessly by applying the provided closureF: FnMut() -> A.
- Error indicating aSplitSink<S>andSplitStream<S>were not two halves of aStream + Split, and thus could not bereunited.
- Stream for thescanmethod.
- Stream for theselect()function.
- An unbounded set of streams
- Future for theselect_next_somemethod.
- Stream for theselect_with_strategy()function. See function docs for details.
- Stream for theskipmethod.
- Stream for theskip_whilemethod.
- ASinkpart of the split pair
- AStreampart of the split pair
- Future for theinto_futuremethod.
- Stream for thetakemethod.
- Stream for thetake_untilmethod.
- Stream for thetake_whilemethod.
- Stream for thethenmethod.
- Future for thetry_allmethod.
- Future for thetry_anymethod.
- Stream for thetry_buffer_unorderedmethod.
- Stream for thetry_bufferedmethod.
- Stream for thetry_chunksmethod.
- Error indicating, that while chunk was collected inner stream produced an error.
- Future for thetry_collectmethod.
- Future for thetry_concatmethod.
- Stream for thetry_filtermethod.
- Stream for thetry_filter_mapmethod.
- Stream for thetry_flattenmethod.
- Stream for thetry_flatten_unorderedmethod.
- Future for thetry_foldmethod.
- Future for thetry_for_eachmethod.
- Future for thetry_for_each_concurrentmethod.
- Future for thetry_nextmethod.
- Stream for thetry_ready_chunksmethod.
- Error indicating, that while chunk was collected inner stream produced an error.
- Stream for thetry_skip_whilemethod.
- Stream for thetry_take_whilemethod.
- Stream for thetry_unfoldfunction.
- Stream for theunfoldfunction.
- Future for theunzipmethod.
- Stream for thezipmethod.
Enums§
- Type to tellSelectWithStrategywhich stream to poll next.
Traits§
- A stream which tracks whether or not the underlying stream should no longer be polled.
- A stream of values produced asynchronously.
- An extension trait forStreams that provides a variety of convenient combinator functions.
- A convenience for streams that returnResultvalues that includes a variety of adapters tailored to such futures.
- Adapters specific toResult-returning streams
Functions§
- Creates a newAbortablestream and anAbortHandlewhich can be used to stop it.
- Creates a stream which contains no elements.
- Converts anIteratorinto aStreamwhich is always ready to yield the next value.
- Creates a stream of a single element.
- Creates a stream which never returns any elements.
- Creates a new stream wrapping a function returningPoll<Option<T>>.
- Creates a new stream that always immediately returns Poll::Ready when awaiting it.
- Create a stream which produces the same item repeatedly.
- Creates a new stream that repeats elements of typeAendlessly by applying the provided closure, the repeater,F: FnMut() -> A.
- This function will attempt to pull items from both streams. Each stream will be polled in a round-robin fashion, and whenever a stream is ready to yield an item that item is yielded.
- Convert a list of streams into aStreamof results from the streams.
- This function will attempt to pull items from both streams. You provide a closure to tellSelectWithStrategywhich stream to poll. The closure can store state onSelectWithStrategyto which it will receive a&muton every invocation. This allows basing the strategy on prior choices.
- Creates aTryStreamfrom a seed and a closure returning aTryFuture.
- Creates aStreamfrom a seed and a closure returning aFuture.
Type Aliases§
- An owned dynamically typedStreamfor use in cases where you can’t statically type your result or need to add some indirection.
- Stream for theflatten_unorderedmethod.
- BoxStream, but without the- Sendrequirement.