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 an
Abortabletask. - A registration handle for an
Abortabletask. 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 an
AbortHandle. - Indicator that the
Abortabletask was aborted. - Future for the
allmethod. - Stream for the
and_thenmethod. - Future for the
anymethod. - Stream for the
buffer_unorderedmethod. - Stream for the
bufferedmethod. - Stream for the
catch_unwindmethod. - Stream for the
chainmethod. - Stream for the
chunksmethod. - Future for the
collectmethod. - Future for the
concatmethod. - Future for the
countmethod. - Stream for the
cyclemethod. - Stream for the
emptyfunction. - Stream for the
enumeratemethod. - Stream for the
err_intomethod. - Stream for the
filtermethod. - Stream for the
filter_mapmethod. - Stream for the
flat_mapmethod. - Stream for the
flat_map_unorderedmethod. - Stream for the
flattenmethod. - Future for the
foldmethod. - Future for the
for_eachmethod. - Future for the
for_each_concurrentmethod. - Future for the
forwardmethod. - Stream for the
fusemethod. - An unbounded queue of futures.
- A set of futures which may complete in any order.
- Stream for the
inspectmethod. - Stream for the
inspect_errmethod. - Stream for the
inspect_okmethod. - Reader for the
into_async_readmethod. - Stream for the
into_streammethod. - Stream for the
iterfunction. - Stream for the
mapmethod. - Stream for the
map_errmethod. - Stream for the
map_okmethod. - Future for the
nextmethod. - Future for the
Peekable::next_ifmethod. - Future for the
Peekable::next_if_eqmethod. - A stream which emits single element and then EOF.
- Stream for the
or_elsemethod. - Future for the
Peekable::peekmethod. - Future for the
Peekable::peek_mutmethod. - A
Streamthat implements apeekmethod. - Stream for the
pending()function. - Stream for the
poll_fnfunction. - Stream for the poll_immediate function.
- Stream for the
ready_chunksmethod. - Stream for the
repeatfunction. - An stream that repeats elements of type
Aendlessly by applying the provided closureF: FnMut() -> A. - Error indicating a
SplitSink<S>andSplitStream<S>were not two halves of aStream + Split, and thus could not bereunited. - Stream for the
scanmethod. - Stream for the
select()function. - An unbounded set of streams
- Future for the
select_next_somemethod. - Stream for the
select_with_strategy()function. See function docs for details. - Stream for the
skipmethod. - Stream for the
skip_whilemethod. - A
Sinkpart of the split pair - A
Streampart of the split pair - Future for the
into_futuremethod. - Stream for the
takemethod. - Stream for the
take_untilmethod. - Stream for the
take_whilemethod. - Stream for the
thenmethod. - Future for the
try_allmethod. - Future for the
try_anymethod. - Stream for the
try_buffer_unorderedmethod. - Stream for the
try_bufferedmethod. - Stream for the
try_chunksmethod. - Error indicating, that while chunk was collected inner stream produced an error.
- Future for the
try_collectmethod. - Future for the
try_concatmethod. - Stream for the
try_filtermethod. - Stream for the
try_filter_mapmethod. - Stream for the
try_flattenmethod. - Stream for the
try_flatten_unorderedmethod. - Future for the
try_foldmethod. - Future for the
try_for_eachmethod. - Future for the
try_for_each_concurrentmethod. - Future for the
try_nextmethod. - Stream for the
try_ready_chunksmethod. - Error indicating, that while chunk was collected inner stream produced an error.
- Stream for the
try_skip_whilemethod. - Stream for the
try_take_whilemethod. - Stream for the
try_unfoldfunction. - Stream for the
unfoldfunction. - Future for the
unzipmethod. - Stream for the
zipmethod.
Enums§
- Type to tell
SelectWithStrategywhich 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 for
Streams that provides a variety of convenient combinator functions. - A convenience for streams that return
Resultvalues that includes a variety of adapters tailored to such futures. - Adapters specific to
Result-returning streams
Functions§
- Creates a new
Abortablestream and anAbortHandlewhich can be used to stop it. - Creates a stream which contains no elements.
- Converts an
Iteratorinto 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 returning
Poll<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 type
Aendlessly 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 a
Streamof results from the streams. - 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. - Creates a
TryStreamfrom a seed and a closure returning aTryFuture. - Creates a
Streamfrom a seed and a closure returning aFuture.
Type Aliases§
- An owned dynamically typed
Streamfor use in cases where you can’t statically type your result or need to add some indirection. - Stream for the
flatten_unorderedmethod. BoxStream, but without theSendrequirement.