pub trait PyStream: Send {
// Required method
fn poll_next_py(
self: Pin<&mut Self>,
py: Python<'_>,
cx: &mut Context<'_>,
) -> Poll<Option<PyResult<PyObject>>>;
}
Expand description
GIL-bound Stream
.
Provided with a blanket implementation for Stream
. GIL is maintained during polling
operation. To release the GIL, see AllowThreads
.
Required Methods§
Sourcefn poll_next_py(
self: Pin<&mut Self>,
py: Python<'_>,
cx: &mut Context<'_>,
) -> Poll<Option<PyResult<PyObject>>>
fn poll_next_py( self: Pin<&mut Self>, py: Python<'_>, cx: &mut Context<'_>, ) -> Poll<Option<PyResult<PyObject>>>
GIL-bound Stream::poll_next
.