Trait pyo3::conversion::IntoPy

source ·
pub trait IntoPy<T>: Sized {
    // Required method
    fn into_py(self, py: Python<'_>) -> T;

    // Provided method
    fn type_output() -> TypeInfo { ... }
}
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.

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.

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§

source

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

Performs the conversion.

Provided Methods§

source

fn type_output() -> TypeInfo

Extracts the type hint information for this type when it appears as a return value.

For example, Vec<u32> would return List[int]. The default implementation returns Any, which is correct for any type.

For most types, the return value for this method will be identical to that of FromPyObject::type_input. It may be different for some types, such as Dict, to allow duck-typing: functions return Dict but take Mapping as argument.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoPy<Py<PyAny>> for &OsStr

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl IntoPy<Py<PyAny>> for IpAddr

source§

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

source§

impl IntoPy<Py<PyAny>> for bool

source§

impl IntoPy<Py<PyAny>> for char

source§

impl IntoPy<Py<PyAny>> for f32

source§

impl IntoPy<Py<PyAny>> for f64

source§

impl IntoPy<Py<PyAny>> for i8

source§

impl IntoPy<Py<PyAny>> for i16

source§

impl IntoPy<Py<PyAny>> for i32

source§

impl IntoPy<Py<PyAny>> for i64

source§

impl IntoPy<Py<PyAny>> for i128

source§

impl IntoPy<Py<PyAny>> for isize

source§

impl IntoPy<Py<PyAny>> for u8

source§

impl IntoPy<Py<PyAny>> for u16

source§

impl IntoPy<Py<PyAny>> for u32

source§

impl IntoPy<Py<PyAny>> for u64

source§

impl IntoPy<Py<PyAny>> for u128

source§

impl IntoPy<Py<PyAny>> for ()

source§

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

source§

impl IntoPy<Py<PyAny>> for usize

source§

impl IntoPy<Py<PyAny>> for String

source§

impl IntoPy<Py<PyAny>> for Duration

source§

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

source§

impl IntoPy<Py<PyAny>> for OsString

source§

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

source§

impl IntoPy<Py<PyAny>> for PathBuf

source§

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

source§

impl IntoPy<Py<PyAny>> for SystemTime

source§

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

source§

impl IntoPy<Py<PyAny>> for NaiveDate

source§

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

source§

impl IntoPy<Py<PyAny>> for NaiveDateTime

source§

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

source§

impl IntoPy<Py<PyAny>> for NaiveTime

source§

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

source§

impl IntoPy<Py<PyAny>> for FixedOffset

source§

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

source§

impl IntoPy<Py<PyAny>> for Utc

source§

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

source§

impl IntoPy<Py<PyAny>> for BigInt

source§

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

source§

impl IntoPy<Py<PyAny>> for BigUint

source§

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

source§

impl IntoPy<Py<PyAny>> for Complex<f32>

source§

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

source§

impl IntoPy<Py<PyAny>> for Complex<f64>

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroI8

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroI16

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroI32

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroI64

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroI128

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroIsize

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroU8

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroU16

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroU32

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroU64

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroU128

source§

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

source§

impl IntoPy<Py<PyAny>> for NonZeroUsize

source§

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

source§

impl IntoPy<Py<PyAny>> for Duration

source§

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

source§

impl IntoPy<Py<PyAny>> for Decimal

source§

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

source§

impl IntoPy<Py<PyTuple>> for ()

Converts () to an empty Python tuple.

source§

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

source§

impl<'a> IntoPy<Py<PyAny>> for &'a str

source§

impl<'a> IntoPy<Py<PyAny>> for &'a String

source§

impl<'a> IntoPy<Py<PyAny>> for &'a OsString

source§

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

source§

impl<'a> IntoPy<Py<PyAny>> for &'a Path

source§

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

source§

impl<'a> IntoPy<Py<PyAny>> for &'a PathBuf

source§

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

source§

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

source§

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

source§

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

source§

impl<'a> IntoPy<Py<PyString>> for &'a str

source§

impl<A> IntoPy<Py<PyAny>> for SmallVec<A>
where A: Array, A::Item: IntoPy<PyObject>,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<K, V, H> IntoPy<Py<PyAny>> for IndexMap<K, V, H>
where K: Hash + Eq + IntoPy<PyObject>, V: IntoPy<PyObject>, H: BuildHasher,

source§

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

source§

impl<L, R> IntoPy<Py<PyAny>> for Either<L, R>
where L: IntoPy<PyObject>, R: IntoPy<PyObject>,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T> IntoPy<Py<PyAny>> for &T
where T: AsRef<PyAny>,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<Tz: TimeZone> IntoPy<Py<PyAny>> for DateTime<Tz>

source§

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

Implementors§

source§

impl IntoPy<Py<CancelledError>> for &CancelledError

source§

impl IntoPy<Py<IncompleteReadError>> for &IncompleteReadError

source§

impl IntoPy<Py<InvalidStateError>> for &InvalidStateError

source§

impl IntoPy<Py<LimitOverrunError>> for &LimitOverrunError

source§

impl IntoPy<Py<QueueEmpty>> for &QueueEmpty

source§

impl IntoPy<Py<QueueFull>> for &QueueFull

source§

impl IntoPy<Py<TimeoutError>> for &TimeoutError

source§

impl IntoPy<Py<gaierror>> for &gaierror

source§

impl IntoPy<Py<herror>> for &herror

source§

impl IntoPy<Py<timeout>> for &timeout

source§

impl IntoPy<Py<PyArithmeticError>> for &PyArithmeticError

source§

impl IntoPy<Py<PyAssertionError>> for &PyAssertionError

source§

impl IntoPy<Py<PyAttributeError>> for &PyAttributeError

source§

impl IntoPy<Py<PyBaseException>> for &PyBaseException

source§

impl IntoPy<Py<PyBlockingIOError>> for &PyBlockingIOError

source§

impl IntoPy<Py<PyBrokenPipeError>> for &PyBrokenPipeError

source§

impl IntoPy<Py<PyBufferError>> for &PyBufferError

source§

impl IntoPy<Py<PyBytesWarning>> for &PyBytesWarning

source§

impl IntoPy<Py<PyChildProcessError>> for &PyChildProcessError

source§

impl IntoPy<Py<PyConnectionAbortedError>> for &PyConnectionAbortedError

source§

impl IntoPy<Py<PyConnectionError>> for &PyConnectionError

source§

impl IntoPy<Py<PyConnectionRefusedError>> for &PyConnectionRefusedError

source§

impl IntoPy<Py<PyConnectionResetError>> for &PyConnectionResetError

source§

impl IntoPy<Py<PyDeprecationWarning>> for &PyDeprecationWarning

source§

impl IntoPy<Py<PyEOFError>> for &PyEOFError

source§

impl IntoPy<Py<PyEnvironmentError>> for &PyEnvironmentError

source§

impl IntoPy<Py<PyException>> for &PyException

source§

impl IntoPy<Py<PyFileExistsError>> for &PyFileExistsError

source§

impl IntoPy<Py<PyFileNotFoundError>> for &PyFileNotFoundError

source§

impl IntoPy<Py<PyFloatingPointError>> for &PyFloatingPointError

source§

impl IntoPy<Py<PyFutureWarning>> for &PyFutureWarning

source§

impl IntoPy<Py<PyGeneratorExit>> for &PyGeneratorExit

source§

impl IntoPy<Py<PyIOError>> for &PyIOError

source§

impl IntoPy<Py<PyImportError>> for &PyImportError

source§

impl IntoPy<Py<PyImportWarning>> for &PyImportWarning

source§

impl IntoPy<Py<PyIndexError>> for &PyIndexError

source§

impl IntoPy<Py<PyInterruptedError>> for &PyInterruptedError

source§

impl IntoPy<Py<PyIsADirectoryError>> for &PyIsADirectoryError

source§

impl IntoPy<Py<PyKeyError>> for &PyKeyError

source§

impl IntoPy<Py<PyKeyboardInterrupt>> for &PyKeyboardInterrupt

source§

impl IntoPy<Py<PyLookupError>> for &PyLookupError

source§

impl IntoPy<Py<PyMemoryError>> for &PyMemoryError

source§

impl IntoPy<Py<PyModuleNotFoundError>> for &PyModuleNotFoundError

source§

impl IntoPy<Py<PyNameError>> for &PyNameError

source§

impl IntoPy<Py<PyNotADirectoryError>> for &PyNotADirectoryError

source§

impl IntoPy<Py<PyNotImplementedError>> for &PyNotImplementedError

source§

impl IntoPy<Py<PyOSError>> for &PyOSError

source§

impl IntoPy<Py<PyOverflowError>> for &PyOverflowError

source§

impl IntoPy<Py<PyPendingDeprecationWarning>> for &PyPendingDeprecationWarning

source§

impl IntoPy<Py<PyPermissionError>> for &PyPermissionError

source§

impl IntoPy<Py<PyProcessLookupError>> for &PyProcessLookupError

source§

impl IntoPy<Py<PyRecursionError>> for &PyRecursionError

source§

impl IntoPy<Py<PyReferenceError>> for &PyReferenceError

source§

impl IntoPy<Py<PyResourceWarning>> for &PyResourceWarning

source§

impl IntoPy<Py<PyRuntimeError>> for &PyRuntimeError

source§

impl IntoPy<Py<PyRuntimeWarning>> for &PyRuntimeWarning

source§

impl IntoPy<Py<PyStopAsyncIteration>> for &PyStopAsyncIteration

source§

impl IntoPy<Py<PyStopIteration>> for &PyStopIteration

source§

impl IntoPy<Py<PySyntaxError>> for &PySyntaxError

source§

impl IntoPy<Py<PySyntaxWarning>> for &PySyntaxWarning

source§

impl IntoPy<Py<PySystemError>> for &PySystemError

source§

impl IntoPy<Py<PySystemExit>> for &PySystemExit

source§

impl IntoPy<Py<PyTimeoutError>> for &PyTimeoutError

source§

impl IntoPy<Py<PyTypeError>> for &PyTypeError

source§

impl IntoPy<Py<PyUnboundLocalError>> for &PyUnboundLocalError

source§

impl IntoPy<Py<PyUnicodeDecodeError>> for &PyUnicodeDecodeError

source§

impl IntoPy<Py<PyUnicodeEncodeError>> for &PyUnicodeEncodeError

source§

impl IntoPy<Py<PyUnicodeError>> for &PyUnicodeError

source§

impl IntoPy<Py<PyUnicodeTranslateError>> for &PyUnicodeTranslateError

source§

impl IntoPy<Py<PyUnicodeWarning>> for &PyUnicodeWarning

source§

impl IntoPy<Py<PyUserWarning>> for &PyUserWarning

source§

impl IntoPy<Py<PyValueError>> for &PyValueError

source§

impl IntoPy<Py<PyWarning>> for &PyWarning

source§

impl IntoPy<Py<PyZeroDivisionError>> for &PyZeroDivisionError

source§

impl IntoPy<Py<PanicException>> for &PanicException

source§

impl IntoPy<Py<PyAny>> for &PyAny

source§

impl IntoPy<Py<PyAny>> for Coroutine

source§

impl IntoPy<Py<PyAny>> for PyErr

source§

impl IntoPy<Py<PyBool>> for &PyBool

source§

impl IntoPy<Py<PyByteArray>> for &PyByteArray

source§

impl IntoPy<Py<PyBytes>> for &PyBytes

source§

impl IntoPy<Py<PyCFunction>> for &PyCFunction

source§

impl IntoPy<Py<PyCapsule>> for &PyCapsule

source§

impl IntoPy<Py<PyCode>> for &PyCode

source§

impl IntoPy<Py<PyComplex>> for &PyComplex

source§

impl IntoPy<Py<PyDate>> for &PyDate

source§

impl IntoPy<Py<PyDateTime>> for &PyDateTime

source§

impl IntoPy<Py<PyDelta>> for &PyDelta

source§

impl IntoPy<Py<PyDict>> for &PyDict

source§

impl IntoPy<Py<PyDictItems>> for &PyDictItems

source§

impl IntoPy<Py<PyDictKeys>> for &PyDictKeys

source§

impl IntoPy<Py<PyDictValues>> for &PyDictValues

source§

impl IntoPy<Py<PyEllipsis>> for &PyEllipsis

source§

impl IntoPy<Py<PyFloat>> for &PyFloat

source§

impl IntoPy<Py<PyFrame>> for &PyFrame

source§

impl IntoPy<Py<PyFrozenSet>> for &PyFrozenSet

source§

impl IntoPy<Py<PyFunction>> for &PyFunction

source§

impl IntoPy<Py<PyIterator>> for &PyIterator

source§

impl IntoPy<Py<PyList>> for &PyList

source§

impl IntoPy<Py<PyLong>> for &PyLong

source§

impl IntoPy<Py<PyMapping>> for &PyMapping

source§

impl IntoPy<Py<PyMemoryView>> for &PyMemoryView

source§

impl IntoPy<Py<PyModule>> for &PyModule

source§

impl IntoPy<Py<PyNone>> for &PyNone

source§

impl IntoPy<Py<PyNotImplemented>> for &PyNotImplemented

source§

impl IntoPy<Py<PySequence>> for &PySequence

source§

impl IntoPy<Py<PySet>> for &PySet

source§

impl IntoPy<Py<PySlice>> for &PySlice

source§

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

source§

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

source§

impl IntoPy<Py<PyString>> for &PyString

source§

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

source§

impl IntoPy<Py<PySuper>> for &PySuper

source§

impl IntoPy<Py<PyTime>> for &PyTime

source§

impl IntoPy<Py<PyTraceback>> for &PyTraceback

source§

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

source§

impl IntoPy<Py<PyTuple>> for &PyTuple

source§

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

source§

impl IntoPy<Py<PyType>> for &PyType

source§

impl IntoPy<Py<PyTzInfo>> for &PyTzInfo

source§

impl<'a> IntoPy<Py<PyAny>> for &'a PyErr

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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