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 pin

In Names
(34)
In Parameters
(110)
In Return Types
(13)
async_std::pinTypes that pin data to its location in memory. 
async_std::pin::PinA pinned pointer. 
async_std::sync::Arc::pinConstructs a new `Pin<Arc<T>>`. If `T` does not implement… 
async_std::process::idReturns the OS-assigned process identifier associated with… 
async_std::task::Task::idGets the task's unique identifier. 
async_std::ioTraits, helpers, and type definitions for core I/O… 
async_std::os::unix::ioUnix-specific I/O extensions. 
async_std::os::windows::ioWindows-specific I/O extensions. 
async_std::net::SocketAddr::ipReturns the IP address associated with this socket address. 
async_std::net::SocketAddrV4::ipReturns the IP address associated with this socket address. 
async_std::net::SocketAddrV6::ipReturns the IP address associated with this socket address. 
async_std::os::unix::fs::DirEntryExt::inoReturns the underlying `d_ino` field in the contained… 
async_std::fs::DirEntry::ino 
async_std::fs::Metadata::lenReturns the file size in bytes. 
async_std::stream::ExactSizeStream::lenReturns the exact number of times the stream will iterate. 
async_std::path::PathBuf::popTruncates `self` to [`self.parent`]. 
async_std::stream::ZipAn iterator that iterates two other iterators… 
async_std::stream::Stream::zip'Zips up' two streams into a single stream of pairs. 
async_std::net::TcpListener::bindCreates a new `TcpListener` which will be bound to the… 
async_std::net::UdpSocket::bindCreates a UDP socket from the given address. 
async_std::os::unix::net::UnixDatagram::bindCreates a Unix datagram socket bound to the given path. 
async_std::os::unix::net::UnixListener::bindCreates a Unix datagram listener bound to the given path. 
async_std::stream::Stream::findSearches for an element in a stream that satisfies a… 
async_std::path::Path::joinCreates an owned [`PathBuf`] with `path` adjoined to `self`. 
async_std::future::joinAwaits multiple futures simultaneously, returning all… 
async_std::io::Error::kindReturns the corresponding `ErrorKind` for this error. 
async_std::path::PrefixComponent::kindReturns the parsed prefix data. 
async_std::fs::File::openOpens a file in read-only mode. 
async_std::fs::OpenOptions::openOpens a file with the configured options. 
async_std::os::unix::net::UnixDatagram::pairCreates an unnamed pair of connected sockets. 
async_std::os::unix::net::UnixStream::pairCreates an unnamed pair of connected sockets. 
async_std::io::SinkA writer that consumes and drops all data. 
async_std::io::sinkCreates a writer that consumes and drops all data. 
async_std::printPrints to the standard output. 
async_std::pin::Pin::eq 
async_std::pin::Pin::ge 
async_std::pin::Pin::gt 
async_std::pin::Pin::le 
async_std::pin::Pin::lt 
async_std::pin::Pin::ne 
async_std::pin::Pin::cmp 
async_std::future::Future::pollAttempt to resolve the future to a final value,… 
async_std::pin::Pin::poll 
async_std::task::JoinHandle::poll 
async_std::pin::Pin::resume 
async_std::io::BufRead::consumeTells this buffer that `amt` bytes have been consumed from… 
async_std::io::BufReader::consume 
async_std::io::Cursor::consume 
async_std::io::Empty::consume 
async_std::pin::Pin::consume 
async_std::pin::Pin::try_poll 
async_std::task::JoinHandle::try_poll 
async_std::stream::Stream::poll_nextAttempts to receive the next item from the stream. 
async_std::fs::ReadDir::poll_next 
async_std::io::Lines::poll_next 
async_std::net::Incoming::poll_next 
async_std::os::unix::net::Incoming::poll_next 
async_std::pin::Pin::poll_next 
async_std::stream::Chain::poll_next 
async_std::stream::Filter::poll_next 
async_std::stream::Fuse::poll_next 
async_std::stream::Inspect::poll_next 
async_std::stream::Scan::poll_next 
async_std::stream::Skip::poll_next 
async_std::stream::SkipWhile::poll_next 
async_std::stream::StepBy::poll_next 
async_std::stream::Take::poll_next 
async_std::stream::TakeWhile::poll_next 
async_std::stream::Zip::poll_next 
async_std::stream::Empty::poll_next 
async_std::stream::FromFn::poll_next 
async_std::stream::Once::poll_next 
async_std::stream::Repeat::poll_next 
async_std::stream::RepeatWith::poll_next 
async_std::stream::Merge::poll_next 
async_std::stream::Interval::poll_next 
async_std::io::Read::poll_readAttempt to read from the `AsyncRead` into `buf`. 
async_std::fs::File::poll_read 
async_std::io::BufReader::poll_read 
async_std::io::Cursor::poll_read 
async_std::io::Empty::poll_read 
async_std::io::Repeat::poll_read 
async_std::io::Stdin::poll_read 
async_std::net::TcpStream::poll_read 
async_std::os::unix::net::UnixStream::poll_read 
async_std::pin::Pin::poll_read 
async_std::io::Seek::poll_seekAttempt to seek to an offset, in bytes, in a stream. 
async_std::io::BufReader::poll_seekSeeks to an offset, in bytes, in the underlying reader. 
async_std::io::BufWriter::poll_seekSeek to the offset, in bytes, in the underlying writer. 
async_std::fs::File::poll_seek 
async_std::io::Cursor::poll_seek 
async_std::pin::Pin::poll_seek 
async_std::pin::Pin::into_innerUnwraps this `Pin<P>` returning the underlying pointer. 
async_std::io::Write::poll_closeAttempt to close the object. 
async_std::fs::File::poll_close 
async_std::io::BufWriter::poll_close 
async_std::io::Cursor::poll_close 
async_std::io::Sink::poll_close 
async_std::io::Stderr::poll_close 
async_std::io::Stdout::poll_close 
async_std::net::TcpStream::poll_close 
async_std::os::unix::net::UnixStream::poll_close 
async_std::pin::Pin::poll_close 
async_std::io::Write::poll_flushAttempt to flush the object, ensuring that any buffered… 
async_std::fs::File::poll_flush 
async_std::io::BufWriter::poll_flush 
async_std::io::Cursor::poll_flush 
async_std::io::Sink::poll_flush 
async_std::io::Stderr::poll_flush 
async_std::io::Stdout::poll_flush 
async_std::net::TcpStream::poll_flush 
async_std::os::unix::net::UnixStream::poll_flush 
async_std::pin::Pin::poll_flush 
async_std::pin::Pin::poll_ready 
async_std::io::Write::poll_writeAttempt to write bytes from `buf` into the object. 
async_std::fs::File::poll_write 
async_std::io::BufWriter::poll_write 
async_std::io::Cursor::poll_write 
async_std::io::Sink::poll_write 
async_std::io::Stderr::poll_write 
async_std::io::Stdout::poll_write 
async_std::net::TcpStream::poll_write 
async_std::os::unix::net::UnixStream::poll_write 
async_std::pin::Pin::poll_write 
async_std::pin::Pin::start_send 
async_std::pin::Pin::partial_cmp 
async_std::io::BufRead::poll_fill_bufReturns the contents of the internal buffer, filling it… 
async_std::io::BufReader::poll_fill_buf 
async_std::io::Cursor::poll_fill_buf 
async_std::io::Empty::poll_fill_buf 
async_std::pin::Pin::poll_fill_buf 
async_std::pin::Pin::try_poll_next 
async_std::stream::Merge::try_poll_next 
async_std::stream::DoubleEndedStream::poll_next_backRemoves and returns an element from the end of the stream. 
async_std::io::Read::poll_read_vectoredAttempt to read from the `AsyncRead` into `bufs` using… 
async_std::io::BufReader::poll_read_vectored 
async_std::io::Cursor::poll_read_vectored 
async_std::net::TcpStream::poll_read_vectored 
async_std::pin::Pin::poll_read_vectored 
async_std::io::Write::poll_write_vectoredAttempt to write bytes from `bufs` into the object using… 
async_std::io::Cursor::poll_write_vectored 
async_std::net::TcpStream::poll_write_vectored 
async_std::pin::Pin::poll_write_vectored 
async_std::pin::Pin::into_inner_uncheckedUnwraps this `Pin<P>` returning the underlying pointer. 
async_std::sync::Arc::pinConstructs a new `Pin<Arc<T>>`. If `T` does not implement… 
async_std::pin::Pin::newConstruct a new `Pin<P>` around a pointer to some data of… 
async_std::pin::Pin::clone 
async_std::pin::Pin::as_mutGets a pinned mutable reference from this pinned pointer. 
async_std::pin::Pin::as_refGets a pinned shared reference from this pinned pointer. 
async_std::pin::Pin::into_refConverts this `Pin<&mut T>` into a `Pin<&T>` with the same… 
async_std::pin::Pin::map_uncheckedConstructs a new pin by mapping the interior value. 
async_std::pin::Pin::new_uncheckedConstruct a new `Pin<P>` around a reference to some data… 
async_std::pin::Pin::map_unchecked_mutConstruct a new pin by mapping the interior value. 
async_std::pin::Pin::fromConverts a `Box<T>` into a `Pin<Box<T>>` 
async_std::stream::FromStream::from_streamCreates a value from a stream. 
async_std::sync::Arc::from_stream 
async_std::stream::Extend::stream_extendExtends a collection with the contents of a stream. 

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)