Trait pyo3::impl_::pyfunction::WrapPyFunctionArg

source ·
pub trait WrapPyFunctionArg<'py, T> {
    // Required method
    fn wrap_pyfunction(self, method_def: &PyMethodDef) -> 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§

source

fn wrap_pyfunction(self, method_def: &PyMethodDef) -> PyResult<T>

Implementors§

source§

impl<'py> WrapPyFunctionArg<'py, &'py PyCFunction> for &'py PyModule

source§

impl<'py> WrapPyFunctionArg<'py, &'py PyCFunction> for Python<'py>

source§

impl<'py> WrapPyFunctionArg<'py, Bound<'py, PyCFunction>> for &Borrowed<'_, 'py, PyModule>

source§

impl<'py> WrapPyFunctionArg<'py, Bound<'py, PyCFunction>> for &Bound<'py, PyModule>

source§

impl<'py> WrapPyFunctionArg<'py, Bound<'py, PyCFunction>> for Borrowed<'_, 'py, PyModule>

source§

impl<'py> WrapPyFunctionArg<'py, Bound<'py, PyCFunction>> for Bound<'py, PyModule>

source§

impl<'py> WrapPyFunctionArg<'py, Bound<'py, PyCFunction>> for OnlyBound<Python<'py>>

source§

impl<'py, T> WrapPyFunctionArg<'py, Bound<'py, PyCFunction>> for OnlyBound<T>
where T: WrapPyFunctionArg<'py, Bound<'py, PyCFunction>>,

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