Module async_std

Source
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-streams

are only available when the unstable-streams Cargo feature is enabled:

[dependencies.pyo3-async-runtimes]
version = "0.24"
features = ["unstable-streams"]

Modules§

re_exports
attributes re-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 awaitable into a Rust Future
local_future_into_pyDeprecated
Convert a !Send Rust Future into a Python awaitable
local_future_into_py_with_localsDeprecated
Convert a !Send Rust 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
attributes Provides the boilerplate for the async-std runtime and runs an async fn as main Enables an async main function that uses the async-std runtime.
test
attributes testing Registers an async-std test with the pyo3-asyncio test harness Registers an async-std test with the pyo3-asyncio test harness.