Trait pyo3::conversion::IntoPy
source · pub trait IntoPy<T>: Sized {
// Required method
fn into_py(self, py: Python<'_>) -> T;
}
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§
Implementations on Foreign Types§
source§impl<T0: IntoPy<PyObject>, T1: IntoPy<PyObject>, T2: IntoPy<PyObject>, T3: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (T0, T1, T2, T3)
impl<T0: IntoPy<PyObject>, T1: IntoPy<PyObject>, T2: IntoPy<PyObject>, T3: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (T0, T1, T2, T3)
source§impl IntoPy<Py<PyAny>> for Duration
Available on crate feature chrono
and non-Py_LIMITED_API
only.
impl IntoPy<Py<PyAny>> for Duration
chrono
and non-Py_LIMITED_API
only.source§impl<T0: IntoPy<PyObject>, T1: IntoPy<PyObject>, T2: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (T0, T1, T2)
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>, T3: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3)
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>, T5: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5)
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<K, V, H> IntoPy<Py<PyAny>> for HashMap<K, V, H>where
K: Hash + Eq + IntoPy<PyObject>,
V: IntoPy<PyObject>,
H: BuildHasher,
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<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)
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>, T8: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
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<K, V, H> IntoPy<Py<PyAny>> for HashMap<K, V, H>where
K: Hash + Eq + IntoPy<PyObject>,
V: IntoPy<PyObject>,
H: BuildHasher,
Available on crate feature hashbrown
only.
impl<K, V, H> IntoPy<Py<PyAny>> for HashMap<K, V, H>where K: Hash + Eq + IntoPy<PyObject>, V: IntoPy<PyObject>, H: BuildHasher,
hashbrown
only.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)
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<K, S> IntoPy<Py<PyAny>> for HashSet<K, S>where
K: IntoPy<PyObject> + Eq + Hash,
S: BuildHasher + Default,
impl<K, S> IntoPy<Py<PyAny>> for HashSet<K, S>where K: IntoPy<PyObject> + Eq + Hash, S: BuildHasher + Default,
source§impl<T, const N: usize> IntoPy<Py<PyAny>> for [T; N]where
T: IntoPy<PyObject>,
Available on min_const_generics
only.
impl<T, const N: usize> IntoPy<Py<PyAny>> for [T; N]where T: IntoPy<PyObject>,
min_const_generics
only.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)
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<K, V> IntoPy<Py<PyAny>> for BTreeMap<K, V>where
K: Eq + IntoPy<PyObject>,
V: IntoPy<PyObject>,
impl<K, V> IntoPy<Py<PyAny>> for BTreeMap<K, V>where K: Eq + IntoPy<PyObject>, V: IntoPy<PyObject>,
source§impl<T0: IntoPy<PyObject>, T1: IntoPy<PyObject>, T2: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (T0, T1, T2)
impl<T0: IntoPy<PyObject>, T1: IntoPy<PyObject>, T2: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (T0, T1, T2)
source§impl<K, V, H> IntoPy<Py<PyAny>> for IndexMap<K, V, H>where
K: Hash + Eq + IntoPy<PyObject>,
V: IntoPy<PyObject>,
H: BuildHasher,
Available on crate feature indexmap
only.
impl<K, V, H> IntoPy<Py<PyAny>> for IndexMap<K, V, H>where K: Hash + Eq + IntoPy<PyObject>, V: IntoPy<PyObject>, H: BuildHasher,
indexmap
only.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)
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>, 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)
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>> IntoPy<Py<PyAny>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
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 IntoPy<Py<PyAny>> for NaiveDateTime
Available on crate feature chrono
and non-Py_LIMITED_API
only.
impl IntoPy<Py<PyAny>> for NaiveDateTime
chrono
and non-Py_LIMITED_API
only.source§impl IntoPy<Py<PyAny>> for FixedOffset
Available on crate feature chrono
and non-Py_LIMITED_API
only.
impl IntoPy<Py<PyAny>> for FixedOffset
chrono
and non-Py_LIMITED_API
only.source§impl<Tz: TimeZone> IntoPy<Py<PyAny>> for DateTime<Tz>
Available on crate feature chrono
and non-Py_LIMITED_API
only.
impl<Tz: TimeZone> IntoPy<Py<PyAny>> for DateTime<Tz>
chrono
and non-Py_LIMITED_API
only.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)
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>, 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)
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<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)
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<K, S> IntoPy<Py<PyAny>> for HashSet<K, S>where
K: IntoPy<PyObject> + Eq + Hash,
S: BuildHasher + Default,
Available on crate feature hashbrown
only.
impl<K, S> IntoPy<Py<PyAny>> for HashSet<K, S>where K: IntoPy<PyObject> + Eq + Hash, S: BuildHasher + Default,
hashbrown
only.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)
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>, T8: IntoPy<PyObject>, T9: IntoPy<PyObject>, T10: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
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>> IntoPy<Py<PyTuple>> for (T0, T1, T2, T3, T4, T5, T6, T7)
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>, 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)
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 IntoPy<Py<PyAny>> for NaiveTime
Available on crate feature chrono
and non-Py_LIMITED_API
only.
impl IntoPy<Py<PyAny>> for NaiveTime
chrono
and non-Py_LIMITED_API
only.source§impl IntoPy<Py<PyAny>> for NaiveDate
Available on crate feature chrono
and non-Py_LIMITED_API
only.
impl IntoPy<Py<PyAny>> for NaiveDate
chrono
and non-Py_LIMITED_API
only.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)
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)
Implementors§
impl IntoPy<Py<CancelledError>> for &CancelledError
impl IntoPy<Py<IncompleteReadError>> for &IncompleteReadError
impl IntoPy<Py<InvalidStateError>> for &InvalidStateError
impl IntoPy<Py<LimitOverrunError>> for &LimitOverrunError
impl IntoPy<Py<QueueEmpty>> for &QueueEmpty
impl IntoPy<Py<QueueFull>> for &QueueFull
impl IntoPy<Py<TimeoutError>> for &TimeoutError
impl IntoPy<Py<gaierror>> for &gaierror
impl IntoPy<Py<herror>> for &herror
impl IntoPy<Py<timeout>> for &timeout
impl IntoPy<Py<PyArithmeticError>> for &PyArithmeticError
impl IntoPy<Py<PyAssertionError>> for &PyAssertionError
impl IntoPy<Py<PyAttributeError>> for &PyAttributeError
impl IntoPy<Py<PyBaseException>> for &PyBaseException
impl IntoPy<Py<PyBlockingIOError>> for &PyBlockingIOError
impl IntoPy<Py<PyBrokenPipeError>> for &PyBrokenPipeError
impl IntoPy<Py<PyBufferError>> for &PyBufferError
impl IntoPy<Py<PyBytesWarning>> for &PyBytesWarning
impl IntoPy<Py<PyChildProcessError>> for &PyChildProcessError
impl IntoPy<Py<PyConnectionAbortedError>> for &PyConnectionAbortedError
impl IntoPy<Py<PyConnectionError>> for &PyConnectionError
impl IntoPy<Py<PyConnectionRefusedError>> for &PyConnectionRefusedError
impl IntoPy<Py<PyConnectionResetError>> for &PyConnectionResetError
impl IntoPy<Py<PyDeprecationWarning>> for &PyDeprecationWarning
impl IntoPy<Py<PyEOFError>> for &PyEOFError
impl IntoPy<Py<PyEncodingWarning>> for &PyEncodingWarning
impl IntoPy<Py<PyEnvironmentError>> for &PyEnvironmentError
impl IntoPy<Py<PyException>> for &PyException
impl IntoPy<Py<PyFileExistsError>> for &PyFileExistsError
impl IntoPy<Py<PyFileNotFoundError>> for &PyFileNotFoundError
impl IntoPy<Py<PyFloatingPointError>> for &PyFloatingPointError
impl IntoPy<Py<PyFutureWarning>> for &PyFutureWarning
impl IntoPy<Py<PyGeneratorExit>> for &PyGeneratorExit
impl IntoPy<Py<PyIOError>> for &PyIOError
impl IntoPy<Py<PyImportError>> for &PyImportError
impl IntoPy<Py<PyImportWarning>> for &PyImportWarning
impl IntoPy<Py<PyIndexError>> for &PyIndexError
impl IntoPy<Py<PyInterruptedError>> for &PyInterruptedError
impl IntoPy<Py<PyIsADirectoryError>> for &PyIsADirectoryError
impl IntoPy<Py<PyKeyError>> for &PyKeyError
impl IntoPy<Py<PyKeyboardInterrupt>> for &PyKeyboardInterrupt
impl IntoPy<Py<PyLookupError>> for &PyLookupError
impl IntoPy<Py<PyMemoryError>> for &PyMemoryError
impl IntoPy<Py<PyModuleNotFoundError>> for &PyModuleNotFoundError
impl IntoPy<Py<PyNameError>> for &PyNameError
impl IntoPy<Py<PyNotADirectoryError>> for &PyNotADirectoryError
impl IntoPy<Py<PyNotImplementedError>> for &PyNotImplementedError
impl IntoPy<Py<PyOSError>> for &PyOSError
impl IntoPy<Py<PyOverflowError>> for &PyOverflowError
impl IntoPy<Py<PyPendingDeprecationWarning>> for &PyPendingDeprecationWarning
impl IntoPy<Py<PyPermissionError>> for &PyPermissionError
impl IntoPy<Py<PyProcessLookupError>> for &PyProcessLookupError
impl IntoPy<Py<PyRecursionError>> for &PyRecursionError
impl IntoPy<Py<PyReferenceError>> for &PyReferenceError
impl IntoPy<Py<PyResourceWarning>> for &PyResourceWarning
impl IntoPy<Py<PyRuntimeError>> for &PyRuntimeError
impl IntoPy<Py<PyRuntimeWarning>> for &PyRuntimeWarning
impl IntoPy<Py<PyStopAsyncIteration>> for &PyStopAsyncIteration
impl IntoPy<Py<PyStopIteration>> for &PyStopIteration
impl IntoPy<Py<PySyntaxError>> for &PySyntaxError
impl IntoPy<Py<PySyntaxWarning>> for &PySyntaxWarning
impl IntoPy<Py<PySystemError>> for &PySystemError
impl IntoPy<Py<PySystemExit>> for &PySystemExit
impl IntoPy<Py<PyTimeoutError>> for &PyTimeoutError
impl IntoPy<Py<PyTypeError>> for &PyTypeError
impl IntoPy<Py<PyUnboundLocalError>> for &PyUnboundLocalError
impl IntoPy<Py<PyUnicodeDecodeError>> for &PyUnicodeDecodeError
impl IntoPy<Py<PyUnicodeEncodeError>> for &PyUnicodeEncodeError
impl IntoPy<Py<PyUnicodeError>> for &PyUnicodeError
impl IntoPy<Py<PyUnicodeTranslateError>> for &PyUnicodeTranslateError
impl IntoPy<Py<PyUnicodeWarning>> for &PyUnicodeWarning
impl IntoPy<Py<PyUserWarning>> for &PyUserWarning
impl IntoPy<Py<PyValueError>> for &PyValueError
impl IntoPy<Py<PyWarning>> for &PyWarning
impl IntoPy<Py<PyZeroDivisionError>> for &PyZeroDivisionError
impl IntoPy<Py<PanicException>> for &PanicException
impl IntoPy<Py<PyAny>> for PyErr
impl IntoPy<Py<PyBool>> for &PyBool
impl IntoPy<Py<PyByteArray>> for &PyByteArray
impl IntoPy<Py<PyBytes>> for &PyBytes
impl IntoPy<Py<PyCFunction>> for &PyCFunction
impl IntoPy<Py<PyCapsule>> for &PyCapsule
impl IntoPy<Py<PyCode>> for &PyCode
Py_LIMITED_API
only.impl IntoPy<Py<PyComplex>> for &PyComplex
impl IntoPy<Py<PyDate>> for &PyDate
Py_LIMITED_API
only.impl IntoPy<Py<PyDateTime>> for &PyDateTime
Py_LIMITED_API
only.impl IntoPy<Py<PyDelta>> for &PyDelta
Py_LIMITED_API
only.impl IntoPy<Py<PyDict>> for &PyDict
impl IntoPy<Py<PyDictItems>> for &PyDictItems
impl IntoPy<Py<PyDictKeys>> for &PyDictKeys
impl IntoPy<Py<PyDictValues>> for &PyDictValues
impl IntoPy<Py<PyFloat>> for &PyFloat
impl IntoPy<Py<PyFrame>> for &PyFrame
Py_LIMITED_API
and non-PyPy
only.impl IntoPy<Py<PyFrozenSet>> for &PyFrozenSet
impl IntoPy<Py<PyFunction>> for &PyFunction
impl IntoPy<Py<PyIterator>> for &PyIterator
impl IntoPy<Py<PyList>> for &PyList
impl IntoPy<Py<PyLong>> for &PyLong
impl IntoPy<Py<PyMapping>> for &PyMapping
impl IntoPy<Py<PyModule>> for &PyModule
impl IntoPy<Py<PySequence>> for &PySequence
impl IntoPy<Py<PySet>> for &PySet
impl IntoPy<Py<PySlice>> for &PySlice
impl IntoPy<Py<PyString>> for &PyString
impl IntoPy<Py<PySuper>> for &PySuper
PyPy
only.impl IntoPy<Py<PyTime>> for &PyTime
Py_LIMITED_API
only.impl IntoPy<Py<PyTraceback>> for &PyTraceback
impl IntoPy<Py<PyTuple>> for &PyTuple
impl IntoPy<Py<PyType>> for &PyType
impl IntoPy<Py<PyTzInfo>> for &PyTzInfo
Py_LIMITED_API
only.