[−][src]Module smol::future
Combinators for the Future trait.
Examples
use futures_lite::*; for step in 0..3 { println!("step {}", step); // Give other tasks a chance to run. future::yield_now().await; }
Structs
| Join | Future for the |
| Pending | Future for the |
| PollFn | Future for the |
| PollOnce | Future for the |
| Race | Future for the |
| Ready | Future for the |
| TryJoin | Future for the |
| YieldNow | Future for the |
Traits
| Future | A future represents an asynchronous computation. |
| FutureExt | Extension trait for |
Functions
| block_on | Blocks the current thread on a future. |
| join | Joins two futures, waiting for both to complete. |
| 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. |
| ready | Creates a future that resolves to the provided value. |
| try_join | Joins two fallible futures, waiting for both to complete or one of them to error. |
| yield_now | Wakes the current task and returns |
Type Definitions
| Boxed | Type alias for |
| BoxedLocal | Type alias for |