pub struct PythonStream { /* private fields */ }Expand description
A handle to an in-flight Python server-stream — the iterator obtained by calling a streaming plugin method.
Send (a Py<PyAny> is Send + Sync) so the host can drive it from a
dedicated pump thread, acquiring the GIL only for each next/cancel.
Implementations§
Source§impl PythonStream
impl PythonStream
Sourcepub fn next(&self) -> PyStreamStep
pub fn next(&self) -> PyStreamStep
Advance one item. Holds the GIL only for the duration of this call, so a slow downstream consumer never pins the interpreter.
Auto Trait Implementations§
impl !RefUnwindSafe for PythonStream
impl Freeze for PythonStream
impl Send for PythonStream
impl Sync for PythonStream
impl Unpin for PythonStream
impl UnsafeUnpin for PythonStream
impl UnwindSafe for PythonStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more