Expand description
Asynchronous values.
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. - Always
Ready - Future for the
always_ready
function. - AndThen
- Future for the
and_then
method. - Catch
Unwind - Future for the
catch_unwind
method. - ErrInto
- Future for the
err_into
method. - Flatten
- Future for the
flatten
method. - Flatten
Stream - Stream for the
flatten_stream
method. - Fuse
- Future for the
fuse
method. - Future
Obj - A custom trait object for polling futures, roughly akin to
Box<dyn Future<Output = T> + Send + 'a>
. - Inspect
- Future for the
inspect
method. - Inspect
Err - Future for the
inspect_err
method. - Inspect
Ok - Future for the
inspect_ok
method. - Into
Future - Future for the
into_future
method. - Into
Stream - Stream for the
into_stream
method. - Join
- Future for the
join
function. - Join3
- Future for the
join3
function. - Join4
- Future for the
join4
function. - Join5
- Future for the
join5
function. - JoinAll
- Future for the
join_all
function. - Lazy
- Future for the
lazy
function. - Local
Future Obj - A custom trait object for polling futures, roughly akin to
Box<dyn Future<Output = T> + 'a>
. - Map
- Future for the
map
method. - MapErr
- Future for the
map_err
method. - MapInto
- Future for the
map_into
combinator. - MapOk
- Future for the
map_ok
method. - MapOk
OrElse - Future for the
map_ok_or_else
method. - Never
Error - Future for the
never_error
combinator. - OkInto
- Future for the
ok_into
method. - Option
Future - A future representing a value which may or may not be present.
- OrElse
- Future for the
or_else
method. - Pending
- Future for the
pending()
function. - PollFn
- Future for the
poll_fn
function. - Poll
Immediate - Future for the
poll_immediate
function. - Ready
- Future for the
ready
function. - Select
- Future for the
select()
function. - Select
All - Future for the
select_all
function. - Select
Ok - Future for the
select_ok
function. - Shared
- Future for the
shared
method. - Then
- Future for the
then
method. - TryFlatten
- Future for the
try_flatten
method. - TryFlatten
Stream - Future for the
try_flatten_stream
method. - TryJoin
- Future for the
try_join
function. - TryJoin3
- Future for the
try_join3
function. - TryJoin4
- Future for the
try_join4
function. - TryJoin5
- Future for the
try_join5
function. - TryJoin
All - Future for the
try_join_all
function. - TrySelect
- Future for the
try_select()
function. - Unit
Error - Future for the
unit_error
combinator. - Unwrap
OrElse - Future for the
unwrap_or_else
method. - Weak
Shared - A weak reference to a
Shared
that can be upgraded much like anArc
.
Enums§
- Either
- Combines two different futures, streams, or sinks having the same associated types into a single type.
- Maybe
Done - A future that may have completed.
- TryMaybe
Done - A future that may have completed with an error.
Traits§
- Fused
Future - A future which tracks whether or not the underlying future should no longer be polled.
- Future
- A future represents an asynchronous computation obtained by use of
async
. - Future
Ext - An extension trait for
Future
s that provides a variety of convenient adapters. - TryFuture
- A convenience for futures that return
Result
values that includes a variety of adapters tailored to such futures. - TryFuture
Ext - Adapters specific to
Result
-returning futures - Unsafe
Future Obj - A custom implementation of a future trait object for
FutureObj
, providing a vtable with drop support.
Functions§
- abortable
- Creates a new
Abortable
future and anAbortHandle
which can be used to stop it. - always_
ready - Creates a future that is always immediately ready with a value.
- err
- Create a future that is immediately ready with an error value.
- join
- Joins the result of two futures, waiting for them both to complete.
- join3
- Same as
join
, but with more futures. - join4
- Same as
join
, but with more futures. - join5
- Same as
join
, but with more futures. - join_
all - Creates a future which represents a collection of the outputs of the futures given.
- lazy
- Creates a new future that allows delayed execution of a closure.
- maybe_
done - Wraps a future into a
MaybeDone
- ok
- Create a future that is immediately ready with a success value.
- pending
- Creates a future which never resolves, representing a computation that never finishes.
- poll_fn
- Creates a new future wrapping around a function returning
Poll
. - poll_
immediate - Creates a future that is immediately ready with an Option of a value. Specifically this means that poll always returns Poll::Ready.
- ready
- Creates a future that is immediately ready with a value.
- select
- Waits for either one of two differently-typed futures to complete.
- select_
all - Creates a new future which will select over a list of futures.
- select_
ok - Creates a new future which will select the first successful future over a list of futures.
- try_
join - Joins the result of two futures, waiting for them both to complete or for one to produce an error.
- try_
join3 - Same as
try_join
, but with more futures. - try_
join4 - Same as
try_join
, but with more futures. - try_
join5 - Same as
try_join
, but with more futures. - try_
join_ all - Creates a future which represents either a collection of the results of the futures given or an error.
- try_
maybe_ done - Wraps a future into a
TryMaybeDone
- try_
select - Waits for either one of two differently-typed futures to complete.
Type Aliases§
- BoxFuture
- An owned dynamically typed
Future
for use in cases where you can’t statically type your result or need to add some indirection. - Local
BoxFuture BoxFuture
, but without theSend
requirement.