Function pyo3::impl_::trampoline::trampoline

source ·
pub(crate) fn trampoline<F, R>(body: F) -> R
where F: for<'py> FnOnce(Python<'py>) -> PyResult<R> + UnwindSafe, R: PyCallbackOutput,
Expand description

Implementation of trampoline functions, which sets up a GILPool and calls F.

Panics during execution are trapped so that they don’t propagate through any outer FFI boundary.

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here