Crate bevy::tasks::futures_lite
source · Expand description
Futures, streams, and async I/O combinators.
This crate is a subset of futures that compiles an order of magnitude faster, fixes minor warts in its API, fills in some obvious gaps, and removes almost all unsafe code from it.
In short, this crate aims to be more enjoyable than futures but still fully compatible with it.
Examples
use futures_lite::future;
fn main() {
future::block_on(async {
println!("Hello world!");
})
}
Modules
Macros
- Pins a variable of type
T
on the stack and rebinds it asPin<&mut T>
. - Unwraps
Poll<T>
or returnsPending
.
Traits
- Read bytes asynchronously.
- Extension trait for
AsyncBufRead
. - Read bytes asynchronously.
- Extension trait for
AsyncRead
. - Seek bytes asynchronously.
- Extension trait for
AsyncSeek
. - Write bytes asynchronously.
- Extension trait for
AsyncWrite
. - A future represents an asynchronous computation obtained by use of
async
. - Extension trait for
Future
. - A stream of values produced asynchronously.
- Extension trait for
Stream
.