MCPcopy Create free account
hub / github.com/PyO3/pyo3 / wrap_pyfunction

Method wrap_pyfunction

src/impl_/pyfunction.rs:58–63  ·  view source on GitHub ↗
(
        self,
        function_def: &'static PyFunctionDef,
    )

Source from the content-addressed store, hash-verified

56
57impl<'py> WrapPyFunctionArg<'py, Bound<'py, PyCFunction>> for Bound<'py, PyModule> {
58 fn wrap_pyfunction(
59 self,
60 function_def: &'static PyFunctionDef,
61 ) -> PyResult<Bound<'py, PyCFunction>> {
62 function_def.create_py_c_function(self.py(), Some(&self))
63 }
64}
65
66impl<'py> WrapPyFunctionArg<'py, Bound<'py, PyCFunction>> for &'_ Bound<'py, PyModule> {

Callers

nothing calls this directly

Calls 2

create_py_c_functionMethod · 0.80
pyMethod · 0.45

Tested by

no test coverage detected