Expand description
Asynchronous streams.
Modules§
- futures_
unordered - An unbounded set of futures.
- select_
all - An unbounded set of streams
Structs§
- Abort
Handle - A handle to an
Abortable
task. - Abort
Registration - A registration handle for an
Abortable
task. Values of this type can be acquired fromAbortHandle::new
and are used in calls toAbortable::new
. - Abortable
- A future/stream which can be remotely short-circuited using an
AbortHandle
. - Aborted
- Indicator that the
Abortable
task was aborted. - All
- Future for the
all
method. - AndThen
- Stream for the
and_then
method. - Any
- Future for the
any
method. - Buffer
Unordered - Stream for the
buffer_unordered
method. - Buffered
- Stream for the
buffered
method. - Catch
Unwind - Stream for the
catch_unwind
method. - Chain
- Stream for the
chain
method. - Chunks
- Stream for the
chunks
method. - Collect
- Future for the
collect
method. - Concat
- Future for the
concat
method. - Count
- Future for the
count
method. - Cycle
- Stream for the
cycle
method. - Empty
- Stream for the
empty
function. - Enumerate
- Stream for the
enumerate
method. - ErrInto
- Stream for the
err_into
method. - Filter
- Stream for the
filter
method. - Filter
Map - Stream for the
filter_map
method. - FlatMap
- Stream for the
flat_map
method. - Flat
MapUnordered - Stream for the
flat_map_unordered
method. - Flatten
- Stream for the
flatten
method. - Fold
- Future for the
fold
method. - ForEach
- Future for the
for_each
method. - ForEach
Concurrent - Future for the
for_each_concurrent
method. - Fuse
- Stream for the
fuse
method. - Futures
Ordered - An unbounded queue of futures.
- Futures
Unordered - A set of futures which may complete in any order.
- Inspect
- Stream for the
inspect
method. - Inspect
Err - Stream for the
inspect_err
method. - Inspect
Ok - Stream for the
inspect_ok
method. - Into
Stream - Stream for the
into_stream
method. - Iter
- Stream for the
iter
function. - Map
- Stream for the
map
method. - MapErr
- Stream for the
map_err
method. - MapOk
- Stream for the
map_ok
method. - Next
- Future for the
next
method. - NextIf
- Future for the
Peekable::next_if
method. - Next
IfEq - Future for the
Peekable::next_if_eq
method. - Once
- A stream which emits single element and then EOF.
- OrElse
- Stream for the
or_else
method. - Peek
- Future for the
Peekable::peek
method. - PeekMut
- Future for the
Peekable::peek_mut
method. - Peekable
- A
Stream
that implements apeek
method. - Pending
- Stream for the
pending()
function. - PollFn
- Stream for the
poll_fn
function. - Poll
Immediate - Stream for the poll_immediate function.
- Ready
Chunks - Stream for the
ready_chunks
method. - Repeat
- Stream for the
repeat
function. - Repeat
With - An stream that repeats elements of type
A
endlessly by applying the provided closureF: FnMut() -> A
. - Scan
- Stream for the
scan
method. - Select
- Stream for the
select()
function. - Select
All - An unbounded set of streams
- Select
Next Some - Future for the
select_next_some
method. - Select
With Strategy - Stream for the
select_with_strategy()
function. See function docs for details. - Skip
- Stream for the
skip
method. - Skip
While - Stream for the
skip_while
method. - Stream
Future - Future for the
into_future
method. - Take
- Stream for the
take
method. - Take
Until - Stream for the
take_until
method. - Take
While - Stream for the
take_while
method. - Then
- Stream for the
then
method. - TryAll
- Future for the
try_all
method. - TryAny
- Future for the
try_any
method. - TryBuffer
Unordered - Stream for the
try_buffer_unordered
method. - TryBuffered
- Stream for the
try_buffered
method. - TryChunks
- Stream for the
try_chunks
method. - TryChunks
Error - Error indicating, that while chunk was collected inner stream produced an error.
- TryCollect
- Future for the
try_collect
method. - TryConcat
- Future for the
try_concat
method. - TryFilter
- Stream for the
try_filter
method. - TryFilter
Map - Stream for the
try_filter_map
method. - TryFlatten
- Stream for the
try_flatten
method. - TryFlatten
Unordered - Stream for the
try_flatten_unordered
method. - TryFold
- Future for the
try_fold
method. - TryFor
Each - Future for the
try_for_each
method. - TryFor
Each Concurrent - Future for the
try_for_each_concurrent
method. - TryNext
- Future for the
try_next
method. - TryReady
Chunks - Stream for the
try_ready_chunks
method. - TryReady
Chunks Error - Error indicating, that while chunk was collected inner stream produced an error.
- TrySkip
While - Stream for the
try_skip_while
method. - TryTake
While - Stream for the
try_take_while
method. - TryUnfold
- Stream for the
try_unfold
function. - Unfold
- Stream for the
unfold
function. - Unzip
- Future for the
unzip
method. - Zip
- Stream for the
zip
method.
Enums§
- Poll
Next - Type to tell
SelectWithStrategy
which 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
Stream
s that provides a variety of convenient combinator functions. - TryStream
- A convenience for streams that return
Result
values that includes a variety of adapters tailored to such futures. - TryStream
Ext - Adapters specific to
Result
-returning streams
Functions§
- abortable
- Creates a new
Abortable
stream and anAbortHandle
which can be used to stop it. - empty
- Creates a stream which contains no elements.
- iter
- Converts an
Iterator
into aStream
which 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
A
endlessly 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
Stream
of results from the streams. - select_
with_ strategy - This function will attempt to pull items from both streams. You provide a
closure to tell
SelectWithStrategy
which stream to poll. The closure can store state onSelectWithStrategy
to which it will receive a&mut
on every invocation. This allows basing the strategy on prior choices. - try_
unfold - Creates a
TryStream
from a seed and a closure returning aTryFuture
. - unfold
- Creates a
Stream
from a seed and a closure returning aFuture
.
Type Aliases§
- BoxStream
- An owned dynamically typed
Stream
for use in cases where you can’t statically type your result or need to add some indirection. - Flatten
Unordered - Stream for the
flatten_unordered
method. - Local
BoxStream BoxStream
, but without theSend
requirement.