[][src]Crate async_std

Async version of the Rust standard library.

Modules in this crate are organized in the same way as in the standard library, except blocking functions have been replaced with async functions and threads have been replaced with lightweight tasks.

More information, reading materials, and other resources:

Examples

Spawn a task and block the current thread on its result:

use async_std::task;

fn main() {
    task::block_on(async {
        println!("Hello, world!");
    })
}

Features

Items marked with unstable are available only when the unstable Cargo feature is enabled:

[dependencies.async-std]
version = "0.99"
features = ["unstable"]

Modules

fs

Filesystem manipulation operations.

future

Asynchronous values.

io

Basic input and output.

net

Networking primitives for TCP/UDP communication.

os

OS-specific extensions.

pinunstable

Types that pin data to its location in memory.

prelude

The async prelude.

stream

Asynchronous iteration.

sync

Synchronization primitives.

task

Asynchronous tasks.

Macros

task_local

Declares task-local values.