Expand description
Runtime compatibility layer
Modules§
- fs
- Asynchronous file utilities.
- io
- Traits, helpers, and type definitions for asynchronous I/O functionality.
- net
- TCP/UDP/Unix bindings for
tokio
. - process
- An implementation of asynchronous process management for Tokio.
- runtime
- The Tokio runtime.
- signal
- Asynchronous signal handling for Tokio.
- stream
- Due to the
Stream
trait’s inclusion instd
landing later than Tokio’s 1.0 release, most of the Tokio stream utilities have been moved into thetokio-stream
crate. - sync
- Synchronization primitives for use in asynchronous contexts.
- task
- Asynchronous green-threads.
- time
- Utilities for tracking time.
Macros§
- join
- Waits on multiple concurrent branches, returning when all branches complete.
- pin
- Pins a value on the stack.
- select
- Waits on multiple concurrent branches, returning when the first branch completes, cancelling the remaining branches.
- task_
local - Declares a new task-local key of type
tokio::task::LocalKey
. - try_
join - Waits on multiple concurrent branches, returning when all branches
complete with
Ok(_)
or on the firstErr(_)
.
Functions§
- spawn
- Spawns a new asynchronous task, returning a
JoinHandle
for it.
Type Aliases§
Attribute Macros§
- main
- Marks async function to be executed by the selected runtime. This macro
helps set up a
Runtime
without requiring the user to use Runtime or Builder directly. - test
- Marks async function to be executed by runtime, suitable to test environment.
This macro helps set up a
Runtime
without requiring the user to use Runtime or Builder directly.