Trait pyo3_asyncio::generic::Runtime [−][src]
pub trait Runtime { type JoinError: JoinError + Send; type JoinHandle: Future<Output = Result<(), Self::JoinError>> + Send; fn scope<F, R>(
event_loop: PyObject,
fut: F
) -> Pin<Box<dyn Future<Output = R> + Send>>
where
F: Future<Output = R> + Send + 'static; fn get_task_event_loop(py: Python<'_>) -> Option<&PyAny>; fn spawn<F>(fut: F) -> Self::JoinHandle
where
F: Future<Output = ()> + Send + 'static; }
Expand description
Generic Rust async/await runtime
Associated Types
Required methods
Set the task local event loop for the given future
fn get_task_event_loop(py: Python<'_>) -> Option<&PyAny>
fn get_task_event_loop(py: Python<'_>) -> Option<&PyAny>
Get the task local event loop for the current task