pyo3::impl_::callback

Trait IntoPyCallbackOutput

Source
pub trait IntoPyCallbackOutput<'py, Target> {
    // Required method
    fn convert(self, py: Python<'py>) -> PyResult<Target>;
}
Expand description

Convert the result of callback function into the appropriate return value.

Required Methods§

Source

fn convert(self, py: Python<'py>) -> PyResult<Target>

Implementations on Foreign Types§

Source§

impl IntoPyCallbackOutput<'_, bool> for bool

Source§

fn convert(self, _: Python<'_>) -> PyResult<bool>

Source§

impl IntoPyCallbackOutput<'_, i32> for bool

Source§

fn convert(self, _: Python<'_>) -> PyResult<c_int>

Source§

impl IntoPyCallbackOutput<'_, i32> for ()

Source§

fn convert(self, _: Python<'_>) -> PyResult<c_int>

Source§

impl IntoPyCallbackOutput<'_, isize> for usize

Source§

fn convert(self, _py: Python<'_>) -> PyResult<Py_ssize_t>

Source§

impl IntoPyCallbackOutput<'_, *mut PyObject> for *mut PyObject

Source§

fn convert(self, _: Python<'_>) -> PyResult<Self>

Source§

impl IntoPyCallbackOutput<'_, ()> for ()

Source§

fn convert(self, _: Python<'_>) -> PyResult<()>

Source§

impl IntoPyCallbackOutput<'_, usize> for usize

Source§

fn convert(self, _: Python<'_>) -> PyResult<usize>

Source§

impl<'py, T, E, U> IntoPyCallbackOutput<'py, U> for Result<T, E>
where T: IntoPyCallbackOutput<'py, U>, E: Into<PyErr>,

Source§

fn convert(self, py: Python<'py>) -> PyResult<U>

Implementors§

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