pub trait PyAsyncProtocol<'p>: PyClass {
fn __await__(slf: Self::Receiver) -> Self::Result
where
Self: PyAsyncAwaitProtocol<'p>,
{ ... }
fn __aiter__(slf: Self::Receiver) -> Self::Result
where
Self: PyAsyncAiterProtocol<'p>,
{ ... }
fn __anext__(slf: Self::Receiver) -> Self::Result
where
Self: PyAsyncAnextProtocol<'p>,
{ ... }
}
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
Expand description
Python Async/Await support interface.
Each method in this trait corresponds to Python async/await implementation.
Provided Methods
fn __await__(slf: Self::Receiver) -> Self::Result where
Self: PyAsyncAwaitProtocol<'p>,
fn __await__(slf: Self::Receiver) -> Self::Result where
Self: PyAsyncAwaitProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __aiter__(slf: Self::Receiver) -> Self::Result where
Self: PyAsyncAiterProtocol<'p>,
fn __aiter__(slf: Self::Receiver) -> Self::Result where
Self: PyAsyncAiterProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __anext__(slf: Self::Receiver) -> Self::Result where
Self: PyAsyncAnextProtocol<'p>,
fn __anext__(slf: Self::Receiver) -> Self::Result where
Self: PyAsyncAnextProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]