Expand description
Asynchronous values.
This module contains:
- The 
Futuretrait. - The 
FutureExtandTryFutureExttrait, which provides adapters for chaining and composing futures. - Top-level future combinators like 
lazywhich creates a future from a closure that defines its return value, andready, which constructs a future with an immediate defined value. 
Re-exports§
pub use core::future::Future;
Structs§
- Always
Ready  - Future for the 
always_readyfunction. - AndThen
 - Future for the 
and_thenmethod. - ErrInto
 - Future for the 
err_intomethod. - Flatten
 - Future for the 
flattenmethod. - Flatten
Sink  - Sink for the 
flatten_sinkmethod. - Flatten
Stream  - Stream for the 
flatten_streammethod. - Fuse
 - Future for the 
fusemethod. - Future
Obj  - A custom trait object for polling futures, roughly akin to
Box<dyn Future<Output = T> + Send + 'a>. - Inspect
 - Future for the 
inspectmethod. - Inspect
Err  - Future for the 
inspect_errmethod. - Inspect
Ok  - Future for the 
inspect_okmethod. - Into
Future  - Future for the 
into_futuremethod. - Into
Stream  - Stream for the 
into_streammethod. - Join
 - Future for the 
joinfunction. - Join3
 - Future for the 
join3function. - Join4
 - Future for the 
join4function. - Join5
 - Future for the 
join5function. - Lazy
 - Future for the 
lazyfunction. - Local
Future Obj  - A custom trait object for polling futures, roughly akin to
Box<dyn Future<Output = T> + 'a>. - Map
 - Future for the 
mapmethod. - MapErr
 - Future for the 
map_errmethod. - MapInto
 - Future for the 
map_intocombinator. - MapOk
 - Future for the 
map_okmethod. - MapOk
OrElse  - Future for the 
map_ok_or_elsemethod. - Never
Error  - Future for the 
never_errorcombinator. - OkInto
 - Future for the 
ok_intomethod. - Option
Future  - A future representing a value which may or may not be present.
 - OrElse
 - Future for the 
or_elsemethod. - Pending
 - Future for the 
pending()function. - PollFn
 - Future for the 
poll_fnfunction. - Poll
Immediate  - Future for the 
poll_immediatefunction. - Ready
 - Future for the 
readyfunction. - Select
 - Future for the 
select()function. - Then
 - Future for the 
thenmethod. - TryFlatten
 - Future for the 
try_flattenmethod. - TryFlatten
Stream  - Future for the 
try_flatten_streammethod. - TryJoin
 - Future for the 
try_joinfunction. - TryJoin3
 - Future for the 
try_join3function. - TryJoin4
 - Future for the 
try_join4function. - TryJoin5
 - Future for the 
try_join5function. - TrySelect
 - Future for the 
try_select()function. - Unit
Error  - Future for the 
unit_errorcombinator. - Unwrap
OrElse  - Future for the 
unwrap_or_elsemethod. 
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
Ext  - An extension trait for 
Futures that provides a variety of convenient adapters. - TryFuture
 - A convenience for futures that return 
Resultvalues 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§
- 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. - 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.
 - 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_
maybe_ done  - Wraps a future into a 
TryMaybeDone - try_
select  - Waits for either one of two differently-typed futures to complete.