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§
- futures_
unordered  - An unbounded set of futures.
 - select_
all  - An unbounded set of streams
 
Structs§
- Abort
Handle  - A handle to an 
Abortabletask. - Abort
Registration  - A registration handle for an 
Abortabletask. Values of this type can be acquired fromAbortHandle::newand are used in calls toAbortable::new. - Abortable
 - A future/stream which can be remotely short-circuited using an 
AbortHandle. - Aborted
 - Indicator that the 
Abortabletask was aborted. - All
 - Future for the 
allmethod. - AndThen
 - Stream for the 
and_thenmethod. - Any
 - Future for the 
anymethod. - Buffer
Unordered  - Stream for the 
buffer_unorderedmethod. - Buffered
 - Stream for the 
bufferedmethod. - Catch
Unwind  - Stream for the 
catch_unwindmethod. - Chain
 - Stream for the 
chainmethod. - Chunks
 - Stream for the 
chunksmethod. - Collect
 - Future for the 
collectmethod. - Concat
 - Future for the 
concatmethod. - Count
 - Future for the 
countmethod. - Cycle
 - Stream for the 
cyclemethod. - Empty
 - Stream for the 
emptyfunction. - Enumerate
 - Stream for the 
enumeratemethod. - ErrInto
 - Stream for the 
err_intomethod. - Filter
 - Stream for the 
filtermethod. - Filter
Map  - Stream for the 
filter_mapmethod. - FlatMap
 - Stream for the 
flat_mapmethod. - Flat
MapUnordered  - Stream for the 
flat_map_unorderedmethod. - Flatten
 - Stream for the 
flattenmethod. - Fold
 - Future for the 
foldmethod. - ForEach
 - Future for the 
for_eachmethod. - ForEach
Concurrent  - Future for the 
for_each_concurrentmethod. - Forward
 - Future for the 
forwardmethod. - Fuse
 - Stream for the 
fusemethod. - Futures
Ordered  - An unbounded queue of futures.
 - Futures
Unordered  - A set of futures which may complete in any order.
 - Inspect
 - Stream for the 
inspectmethod. - Inspect
Err  - Stream for the 
inspect_errmethod. - Inspect
Ok  - Stream for the 
inspect_okmethod. - Into
Async Read  - Reader for the 
into_async_readmethod. - Into
Stream  - Stream for the 
into_streammethod. - Iter
 - Stream for the 
iterfunction. - Map
 - Stream for the 
mapmethod. - MapErr
 - Stream for the 
map_errmethod. - MapOk
 - Stream for the 
map_okmethod. - Next
 - Future for the 
nextmethod. - NextIf
 - Future for the 
Peekable::next_ifmethod. - Next
IfEq  - Future for the 
Peekable::next_if_eqmethod. - Once
 - A stream which emits single element and then EOF.
 - OrElse
 - Stream for the 
or_elsemethod. - Peek
 - Future for the 
Peekable::peekmethod. - PeekMut
 - Future for the 
Peekable::peek_mutmethod. - Peekable
 - A 
Streamthat implements apeekmethod. - Pending
 - Stream for the 
pending()function. - PollFn
 - Stream for the 
poll_fnfunction. - Poll
Immediate  - Stream for the poll_immediate function.
 - Ready
Chunks  - Stream for the 
ready_chunksmethod. - Repeat
 - Stream for the 
repeatfunction. - Repeat
With  - An stream that repeats elements of type 
Aendlessly by applying the provided closureF: FnMut() -> A. - Reunite
Error  - Error indicating a 
SplitSink<S>andSplitStream<S>were not two halves of aStream + Split, and thus could not bereunited. - Scan
 - Stream for the 
scanmethod. - Select
 - Stream for the 
select()function. - Select
All  - An unbounded set of streams
 - Select
Next Some  - Future for the 
select_next_somemethod. - Select
With Strategy  - Stream for the 
select_with_strategy()function. See function docs for details. - Skip
 - Stream for the 
skipmethod. - Skip
While  - Stream for the 
skip_whilemethod. - Split
Sink  - A 
Sinkpart of the split pair - Split
Stream  - A 
Streampart of the split pair - Stream
Future  - Future for the 
into_futuremethod. - Take
 - Stream for the 
takemethod. - Take
Until  - Stream for the 
take_untilmethod. - Take
While  - Stream for the 
take_whilemethod. - Then
 - Stream for the 
thenmethod. - TryAll
 - Future for the 
try_allmethod. - TryAny
 - Future for the 
try_anymethod. - TryBuffer
Unordered  - Stream for the
try_buffer_unorderedmethod. - TryBuffered
 - Stream for the 
try_bufferedmethod. - TryChunks
 - Stream for the 
try_chunksmethod. - TryChunks
Error  - Error indicating, that while chunk was collected inner stream produced an error.
 - TryCollect
 - Future for the 
try_collectmethod. - TryConcat
 - Future for the 
try_concatmethod. - TryFilter
 - Stream for the 
try_filtermethod. - TryFilter
Map  - Stream for the 
try_filter_mapmethod. - TryFlatten
 - Stream for the 
try_flattenmethod. - TryFlatten
Unordered  - Stream for the 
try_flatten_unorderedmethod. - TryFold
 - Future for the 
try_foldmethod. - TryFor
Each  - Future for the 
try_for_eachmethod. - TryFor
Each Concurrent  - Future for the
try_for_each_concurrentmethod. - TryNext
 - Future for the 
try_nextmethod. - TryReady
Chunks  - Stream for the 
try_ready_chunksmethod. - TryReady
Chunks Error  - Error indicating, that while chunk was collected inner stream produced an error.
 - TrySkip
While  - Stream for the 
try_skip_whilemethod. - TryTake
While  - Stream for the 
try_take_whilemethod. - TryUnfold
 - Stream for the 
try_unfoldfunction. - Unfold
 - Stream for the 
unfoldfunction. - Unzip
 - Future for the 
unzipmethod. - Zip
 - Stream for the 
zipmethod. 
Enums§
- Poll
Next  - Type to tell 
SelectWithStrategywhich stream to poll next. 
Traits§
- Fused
Stream  - A stream which tracks whether or not the underlying stream should no longer be polled.
 - Stream
 - A stream of values produced asynchronously.
 - Stream
Ext  - An extension trait for 
Streams that provides a variety of convenient combinator functions. - TryStream
 - A convenience for streams that return 
Resultvalues that includes a variety of adapters tailored to such futures. - TryStream
Ext  - Adapters specific to 
Result-returning streams 
Functions§
- abortable
 - Creates a new 
Abortablestream and anAbortHandlewhich can be used to stop it. - empty
 - Creates a stream which contains no elements.
 - iter
 - Converts an 
Iteratorinto aStreamwhich is always ready to yield the next value. - once
 - Creates a stream of a single element.
 - pending
 - Creates a stream which never returns any elements.
 - poll_fn
 - Creates a new stream wrapping a function returning 
Poll<Option<T>>. - poll_
immediate  - Creates a new stream that always immediately returns Poll::Ready when awaiting it.
 - repeat
 - Create a stream which produces the same item repeatedly.
 - repeat_
with  - Creates a new stream that repeats elements of type 
Aendlessly by applying the provided closure, the repeater,F: FnMut() -> A. - select
 - 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.
 - select_
all  - Convert a list of streams into a 
Streamof results from the streams. - select_
with_ strategy  - This function will attempt to pull items from both streams. You provide a
closure to tell 
SelectWithStrategywhich 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. - try_
unfold  - Creates a 
TryStreamfrom a seed and a closure returning aTryFuture. - unfold
 - Creates a 
Streamfrom a seed and a closure returning aFuture. 
Type Aliases§
- BoxStream
 - An owned dynamically typed 
Streamfor use in cases where you can’t statically type your result or need to add some indirection. - Flatten
Unordered  - Stream for the 
flatten_unorderedmethod. - Local
BoxStream  BoxStream, but without theSendrequirement.