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.
Structs§
- Future for the
allmethod. - Stream for the
and_thenmethod. - Future for the
anymethod. - Stream for the
chainmethod. - 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
flattenmethod. - Future for the
foldmethod. - Future for the
for_eachmethod. - Stream for the
fusemethod. - Stream for the
inspectmethod. - Stream for the
inspect_errmethod. - Stream for the
inspect_okmethod. - 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
repeatfunction. - An stream that repeats elements of type
Aendlessly by applying the provided closureF: FnMut() -> A. - Stream for the
scanmethod. - Stream for the
select()function. - 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. - 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. - 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. - Future for the
try_foldmethod. - Future for the
try_for_eachmethod. - Future for the
try_nextmethod. - 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 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.
- 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.