Module futures_lite::future [−][src]
Combinators for the Future
trait.
Examples
use futures_lite::future; for step in 0..3 { println!("step {}", step); // Give other tasks a chance to run. future::yield_now().await; }
Re-exports
pub use core::future::Future; |
Structs
CatchUnwind | Future for the |
Or | Future for the |
Pending | Future for the |
PollFn | Future for the |
PollOnce | Future for the |
Race | Future for the |
Ready | Future for the |
TryZip | Future for the |
YieldNow | Future for the |
Zip | Future for the |
Traits
FutureExt | Extension trait for |
Functions
block_on | Blocks the current thread on a future. |
or | Returns the result of the future that completes first, preferring |
pending | Creates a future that is always pending. |
poll_fn | Creates a future from a function returning |
poll_once | Polls a future just once and returns an |
race | Returns the result of the future that completes first, with no preference if both are ready. |
ready | Creates a future that resolves to the provided value. |
try_zip | Joins two fallible futures, waiting for both to complete or one of them to error. |
yield_now | Wakes the current task and returns |
zip | Joins two futures, waiting for both to complete. |
Type Definitions
Boxed | Type alias for |
BoxedLocal | Type alias for |