Expand description
async-std-runtime PyO3 Asyncio functions specific to the async-std runtime
Items marked with <span class=“module-item stab portability” style=“display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;”
unstable-streamsare only available when theunstable-streamsCargo feature is enabled:
[dependencies.pyo3-asyncio]
version = "0.20"
features = ["unstable-streams"]Modules§
- re_
exports attributesre-exports for macros
Functions§
- future_
into_ py - Convert a Rust Future into a Python awaitable
- future_
into_ py_ with_ locals - Convert a Rust Future into a Python awaitable
- get_
current_ locals - Either copy the task locals from the current task OR get the current running loop and contextvars from Python.
- get_
current_ loop - Get the current event loop from either Python or Rust async task local context
- into_
future - Convert a Python
awaitableinto a Rust Future - local_
future_ into_ py Deprecated - Convert a
!SendRust Future into a Python awaitable - local_
future_ into_ py_ with_ locals Deprecated - Convert a
!SendRust Future into a Python awaitable - run
- Run the event loop until the given Future completes
- run_
until_ complete - Run the event loop until the given Future completes
- scope
- Set the task local event loop for the given future
- scope_
local - Set the task local event loop for the given !Send future
Attribute Macros§
- main
attributesProvides the boilerplate for theasync-stdruntime and runs an async fn as main Enables an async main function that uses the async-std runtime.- test
attributestestingRegisters anasync-stdtest with thepyo3-asynciotest harness Registers anasync-stdtest with thepyo3-asynciotest harness.