devela::_dep::pyo3::conversion

Trait IntoPy

pub trait IntoPy<T>: Sized {
    // Required method
    fn into_py(self, py: Python<'_>) -> T;
}
👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
Available on crate features dep_pyo3 and std only.
Expand description

Defines a conversion from a Rust type to a Python object.

It functions similarly to std’s Into trait, but requires a GIL token as an argument. Many functions and traits internal to PyO3 require this trait as a bound, so a lack of this trait can manifest itself in different error messages.

§Examples

§With #[pyclass]

The easiest way to implement IntoPy is by exposing a struct as a native Python object by annotating it with #[pyclass].

use pyo3::prelude::*;

#[pyclass]
struct Number {
    #[pyo3(get, set)]
    value: i32,
}

Python code will see this as an instance of the Number class with a value attribute.

§Conversion to a Python object

However, it may not be desirable to expose the existence of Number to Python code. IntoPy allows us to define a conversion to an appropriate Python object.

#![allow(deprecated)]
use pyo3::prelude::*;

struct Number {
    value: i32,
}

impl IntoPy<PyObject> for Number {
    fn into_py(self, py: Python<'_>) -> PyObject {
        // delegates to i32's IntoPy implementation.
        self.value.into_py(py)
    }
}

Python code will see this as an int object.

§Dynamic conversion into Python objects.

It is also possible to return a different Python object depending on some condition. This is useful for types like enums that can carry different types.

#![allow(deprecated)]
use pyo3::prelude::*;

enum Value {
    Integer(i32),
    String(String),
    None,
}

impl IntoPy<PyObject> for Value {
    fn into_py(self, py: Python<'_>) -> PyObject {
        match self {
            Self::Integer(val) => val.into_py(py),
            Self::String(val) => val.into_py(py),
            Self::None => py.None(),
        }
    }
}

Python code will see this as any of the int, string or None objects.

Required Methods§

fn into_py(self, py: Python<'_>) -> T

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.

Performs the conversion.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl IntoPy<Py<PyAny>> for &str

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for &[u8]

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for bool

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for char

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for f32

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for f64

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for i8

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for i16

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for i32

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for i64

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for i128

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for isize

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for u8

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for u16

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for u32

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for u64

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for u128

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for ()

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyAny>> for usize

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyString>> for &str

§

fn into_py(self, py: Python<'_>) -> Py<PyString>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl IntoPy<Py<PyTuple>> for ()

Converts () to an empty Python tuple.

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0> IntoPy<Py<PyAny>> for (T0,)
where T0: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0> IntoPy<Py<PyTuple>> for (T0,)
where T0: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1> IntoPy<Py<PyAny>> for (T0, T1)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1> IntoPy<Py<PyTuple>> for (T0, T1)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2> IntoPy<Py<PyAny>> for (T0, T1, T2)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2> IntoPy<Py<PyTuple>> for (T0, T1, T2)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3> IntoPy<Py<PyAny>> for (T0, T1, T2, T3)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4, T5)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4, T5, T6)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4, T5, T6, T7)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6, T7)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>, T8: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>, T8: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>, T8: IntoPy<Py<PyAny>>, T9: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>, T8: IntoPy<Py<PyAny>>, T9: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>, T8: IntoPy<Py<PyAny>>, T9: IntoPy<Py<PyAny>>, T10: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>, T8: IntoPy<Py<PyAny>>, T9: IntoPy<Py<PyAny>>, T10: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>, T8: IntoPy<Py<PyAny>>, T9: IntoPy<Py<PyAny>>, T10: IntoPy<Py<PyAny>>, T11: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where T0: IntoPy<Py<PyAny>>, T1: IntoPy<Py<PyAny>>, T2: IntoPy<Py<PyAny>>, T3: IntoPy<Py<PyAny>>, T4: IntoPy<Py<PyAny>>, T5: IntoPy<Py<PyAny>>, T6: IntoPy<Py<PyAny>>, T7: IntoPy<Py<PyAny>>, T8: IntoPy<Py<PyAny>>, T9: IntoPy<Py<PyAny>>, T10: IntoPy<Py<PyAny>>, T11: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyTuple>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.
§

impl<T, const N: usize> IntoPy<Py<PyAny>> for [T; N]
where T: IntoPy<Py<PyAny>>,

§

fn into_py(self, py: Python<'_>) -> Py<PyAny>

👎Deprecated since 0.23.0: IntoPy is going to be replaced by IntoPyObject. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.

Implementors§

§

impl IntoPy<Py<PyAny>> for &Path

§

impl IntoPy<Py<PyAny>> for &PathBuf

§

impl IntoPy<Py<PyAny>> for &String

§

impl IntoPy<Py<PyAny>> for &OsStr

§

impl IntoPy<Py<PyAny>> for &OsString

§

impl IntoPy<Py<PyAny>> for &PyErr

§

impl IntoPy<Py<PyAny>> for IpAddr

§

impl IntoPy<Py<PyAny>> for Cow<'_, str>

§

impl IntoPy<Py<PyAny>> for Cow<'_, Path>

§

impl IntoPy<Py<PyAny>> for Cow<'_, OsStr>

§

impl IntoPy<Py<PyAny>> for Cow<'_, [u8]>

§

impl IntoPy<Py<PyAny>> for NonZero<i8>

§

impl IntoPy<Py<PyAny>> for NonZero<i16>

§

impl IntoPy<Py<PyAny>> for NonZero<i32>

§

impl IntoPy<Py<PyAny>> for NonZero<i64>

§

impl IntoPy<Py<PyAny>> for NonZero<i128>

§

impl IntoPy<Py<PyAny>> for NonZero<isize>

§

impl IntoPy<Py<PyAny>> for NonZero<u8>

§

impl IntoPy<Py<PyAny>> for NonZero<u16>

§

impl IntoPy<Py<PyAny>> for NonZero<u32>

§

impl IntoPy<Py<PyAny>> for NonZero<u64>

§

impl IntoPy<Py<PyAny>> for NonZero<u128>

§

impl IntoPy<Py<PyAny>> for NonZero<usize>

§

impl IntoPy<Py<PyAny>> for PathBuf

§

impl IntoPy<Py<PyAny>> for String

§

impl IntoPy<Py<PyAny>> for OsString

§

impl IntoPy<Py<PyAny>> for Duration

§

impl IntoPy<Py<PyAny>> for SystemTime

§

impl IntoPy<Py<PyAny>> for PyBackedBytes

§

impl IntoPy<Py<PyAny>> for PyBackedStr

§

impl IntoPy<Py<PyAny>> for PyErr

§

impl IntoPy<Py<PyString>> for &Bound<'_, PyString>

§

impl IntoPy<Py<PyString>> for &Py<PyString>

§

impl IntoPy<Py<PyString>> for Bound<'_, PyString>

§

impl IntoPy<Py<PyTuple>> for &Bound<'_, PyTuple>

§

impl IntoPy<Py<PyTuple>> for Bound<'_, PyTuple>

§

impl<K> IntoPy<Py<PyAny>> for BTreeSet<K>
where K: IntoPy<Py<PyAny>> + Ord,

§

impl<K, S> IntoPy<Py<PyAny>> for devela::all::HashSet<K, S>
where K: IntoPy<Py<PyAny>> + Eq + Hash, S: BuildHasher + Default,

§

impl<K, S> IntoPy<Py<PyAny>> for devela::_dep::_std::collections::HashSet<K, S>
where K: IntoPy<Py<PyAny>> + Eq + Hash, S: BuildHasher + Default,

§

impl<K, V> IntoPy<Py<PyAny>> for BTreeMap<K, V>
where K: Eq + IntoPy<Py<PyAny>>, V: IntoPy<Py<PyAny>>,

§

impl<K, V, H> IntoPy<Py<PyAny>> for devela::all::HashMap<K, V, H>
where K: Hash + Eq + IntoPy<Py<PyAny>>, V: IntoPy<Py<PyAny>>, H: BuildHasher,

§

impl<K, V, H> IntoPy<Py<PyAny>> for devela::_dep::_std::collections::HashMap<K, V, H>
where K: Hash + Eq + IntoPy<Py<PyAny>>, V: IntoPy<Py<PyAny>>, H: BuildHasher,

§

impl<T> IntoPy<Py<PyAny>> for &Bound<'_, T>

§

impl<T> IntoPy<Py<PyAny>> for &Py<T>

§

impl<T> IntoPy<Py<PyAny>> for &PyRef<'_, T>
where T: PyClass,

§

impl<T> IntoPy<Py<PyAny>> for &PyRefMut<'_, T>
where T: PyClass<Frozen = False>,

§

impl<T> IntoPy<Py<PyAny>> for Option<T>
where T: IntoPy<Py<PyAny>>,

§

impl<T> IntoPy<Py<PyAny>> for Cell<T>
where T: Copy + IntoPy<Py<PyAny>>,

§

impl<T> IntoPy<Py<PyAny>> for Vec<T>
where T: IntoPy<Py<PyAny>>,

§

impl<T> IntoPy<Py<PyAny>> for Borrowed<'_, '_, T>

§

impl<T> IntoPy<Py<PyAny>> for Bound<'_, T>

§

impl<T> IntoPy<Py<PyAny>> for Py<T>

§

impl<T> IntoPy<Py<PyAny>> for PyRef<'_, T>
where T: PyClass,

§

impl<T> IntoPy<Py<PyAny>> for PyRefMut<'_, T>
where T: PyClass<Frozen = False>,