pub trait WrapPyFunctionArg<'py, T>: Sealed {
// Required method
fn wrap_pyfunction(
self,
function_def: &'static PyFunctionDef,
) -> PyResult<T>;
}Expand description
Trait to enable the use of wrap_pyfunction with both Python and PyModule,
and also to infer the return type of either &'py PyCFunction or Bound<'py, PyCFunction>.
Required Methods§
fn wrap_pyfunction(self, function_def: &'static PyFunctionDef) -> PyResult<T>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".