Docs.rs
  • async-std-0.99.10
    • async-std 0.99.10
    • Docs.rs crate page
    • Apache-2.0/MIT
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • skade
    • yoshuawuyts
    • Keruspe
    • joshtriplett
    • dignifiedquire
    • Dependencies
      • async-macros ^1.0.0 normal
      • async-task ^1.0.0 normal
      • broadcaster ^0.2.6 normal
      • cfg-if ^0.1.9 normal
      • crossbeam-channel ^0.3.9 normal
      • crossbeam-deque ^0.7.1 normal
      • futures-core-preview = 0.3.0-alpha.19 normal
      • futures-io-preview = 0.3.0-alpha.19 normal
      • futures-timer ^1.0.2 normal
      • kv-log-macro ^1.0.4 normal
      • lazy_static ^1.4.0 normal
      • log ^0.4.8 normal
      • memchr ^2.2.1 normal
      • mio ^0.6.19 normal
      • mio-uds ^0.6.7 normal
      • num_cpus ^1.10.1 normal
      • pin-utils ^0.1.0-alpha.4 normal
      • slab ^0.4.2 normal
      • femme ^1.2.0 dev
      • futures-channel-preview = 0.3.0-alpha.19 dev
      • futures-preview = 0.3.0-alpha.19 dev
      • futures-util-preview = 0.3.0-alpha.19 dev
      • tempdir ^0.3.7 dev
    • Versions
  • Go to latest version
  • Platform
    • i686-apple-darwin
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation
☰
logo

Crate async_std

See all async_std's items

  • Modules
  • Macros

Crates

  • async_std
Change settings

[−][src]Crate async_std

[−] Expand description

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:

  • 🌐 The async-std website
  • 📖 The async-std book
  • 🐙 GitHub repository
  • 📒 List of code examples
  • 💬 Discord chat

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

Traits, helpers, and type definitions for core I/O functionality.

net

Networking primitives for TCP/UDP communication.

os

OS-specific extensions.

path

Cross-platform path manipulation.

pinunstable

Types that pin data to its location in memory.

prelude

The async prelude.

processunstable

A module for working with processes.

stream

Composable asynchronous iteration.

sync

Synchronization primitives.

task

Types and traits for working with asynchronous tasks.

Macros

eprintunstable

Prints to the standard error.

eprintlnunstable

Prints to the standard error, with a newline.

printunstable

Prints to the standard output.

printlnunstable

Prints to the standard output, with a newline.

task_local

Declares task-local values.

writeunstable

Writes formatted data into a buffer.

writelnunstable

Write formatted data into a buffer, with a newline appended.

Results for SocketAddrV4

In Names
(4)
In Parameters
(2)
In Return Types
(17)
async_std::net::SocketAddrV4An IPv4 socket address. 
async_std::net::SocketAddrV6An IPv6 socket address. 
async_std::os::unix::net::SocketAddrAn address associated with a Unix socket. 
async_std::net::SocketAddrAn internet socket address, either IPv4 or IPv6. 
async_std::net::SocketAddrV4::eq 
async_std::net::SocketAddr::fromConverts a [`SocketAddrV4`] into a [`SocketAddr::V4`]. 
async_std::net::SocketAddrV4::newCreates a new socket address from an [IPv4 address] and a… 
async_std::net::SocketAddrV4::clone 
async_std::net::SocketAddrV4::from_str 
async_std::net::SocketAddrV6::from_str 
async_std::net::SocketAddr::from_str 
async_std::net::TcpStream::peer_addrReturns the remote address that this stream is connected to. 
async_std::os::unix::net::UnixDatagram::peer_addrReturns the address of this socket's peer. 
async_std::os::unix::net::UnixStream::peer_addrReturns the socket address of the remote half of this… 
async_std::net::TcpListener::local_addrReturns the local address that this listener is bound to. 
async_std::net::TcpStream::local_addrReturns the local address that this stream is connected to. 
async_std::net::UdpSocket::local_addrReturns the local address that this listener is bound to. 
async_std::os::unix::net::UnixDatagram::local_addrReturns the address of this socket. 
async_std::os::unix::net::UnixListener::local_addrReturns the local socket address of this listener. 
async_std::os::unix::net::UnixStream::local_addrReturns the socket address of the local half of this… 
async_std::net::SocketAddrV6::to_socket_addrs 
async_std::net::SocketAddrV4::to_socket_addrs 
async_std::net::SocketAddr::to_socket_addrs 

Help

Keyboard Shortcuts

?
Show this help dialog
S
Focus the search field
↑
Move up in search results
↓
Move down in search results
↹
Switch tab
⏎
Go to active search result
+
Expand all sections
-
Collapse all sections

Search Tricks

Prefix searches with a type followed by a colon (e.g., fn:) to restrict the search to a given type.

Accepted types are: fn, mod, struct, enum, trait, type, macro, and const.

Search functions by type signature (e.g., vec -> usize or * -> vec)

Search multiple things at once by splitting your query with comma (e.g., str,u8 or String,struct:Vec,test)