Skip to main content

Module coroutine

Module coroutine 

Source
Available on crate feature experimental-async only.
Expand description

Python coroutine implementation, used notably when wrapping async fn with #[pyfunction]/#[pymethods].

Re-exportsยง

use alloc::sync::Arc; ๐Ÿ”’
use core::future::Future; ๐Ÿ”’
use core::pin::Pin; ๐Ÿ”’
use core::task::Context; ๐Ÿ”’
use core::task::Poll; ๐Ÿ”’
use core::task::Waker; ๐Ÿ”’
use pyo3_macros::pyclass; ๐Ÿ”’
use pyo3_macros::pymethods; ๐Ÿ”’
use crate::panic::PanicException; ๐Ÿ”’ panic=unwind and wip_feature_std
use crate::Bound; ๐Ÿ”’
use crate::Py; ๐Ÿ”’
use crate::PyAny; ๐Ÿ”’
use crate::PyErr; ๐Ÿ”’
use crate::PyResult; ๐Ÿ”’
use crate::Python; ๐Ÿ”’
use crate::coroutine::cancel::ThrowCallback; ๐Ÿ”’
use crate::coroutine::waker::AsyncioWaker; ๐Ÿ”’
use crate::exceptions::PyAttributeError; ๐Ÿ”’
use crate::exceptions::PyRuntimeError; ๐Ÿ”’
use crate::exceptions::PyStopIteration; ๐Ÿ”’
use crate::types::PyIterator; ๐Ÿ”’
use crate::types::PyString; ๐Ÿ”’
use crate::types::string::PyStringMethods; ๐Ÿ”’
pub use cancel::CancelHandle;
use crate::platform::prelude::*; ๐Ÿ”’

Modulesยง

cancel ๐Ÿ”’
waker ๐Ÿ”’

Structsยง

Coroutine
Python coroutine wrapping a Future.

Constantsยง

COROUTINE_REUSED_ERROR ๐Ÿ”’
โš ๏ธ Internal Docs โš ๏ธ Not Public API ๐Ÿ‘‰ Official Docs Here