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§
Provided Methods§
sourcefn type_output() -> TypeInfo
Available on crate feature experimental-inspect
only.
fn type_output() -> TypeInfo
experimental-inspect
only.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§
Implementations on Foreign Types§
source§impl<K, V, H> IntoPy<Py<PyAny>> for HashMap<K, V, H>
Available on crate feature hashbrown
only.
impl<K, V, H> IntoPy<Py<PyAny>> for HashMap<K, V, H>
hashbrown
only.source§impl<K, V, H> IntoPy<Py<PyAny>> for IndexMap<K, V, H>
Available on crate feature indexmap
only.
impl<K, V, H> IntoPy<Py<PyAny>> for IndexMap<K, V, H>
indexmap
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>> 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<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<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>> 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>> 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<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>> 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<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<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>> 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>> 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>> 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<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<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)
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>, 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<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>, 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<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)
Implementors§
impl IntoPy<Py<CancelledError>> for &CancelledError
gil-refs
only.impl IntoPy<Py<IncompleteReadError>> for &IncompleteReadError
gil-refs
only.impl IntoPy<Py<InvalidStateError>> for &InvalidStateError
gil-refs
only.impl IntoPy<Py<LimitOverrunError>> for &LimitOverrunError
gil-refs
only.impl IntoPy<Py<QueueEmpty>> for &QueueEmpty
gil-refs
only.impl IntoPy<Py<QueueFull>> for &QueueFull
gil-refs
only.impl IntoPy<Py<TimeoutError>> for &TimeoutError
gil-refs
only.impl IntoPy<Py<gaierror>> for &gaierror
gil-refs
only.impl IntoPy<Py<herror>> for &herror
gil-refs
only.impl IntoPy<Py<timeout>> for &timeout
gil-refs
only.impl IntoPy<Py<PyArithmeticError>> for &PyArithmeticError
gil-refs
only.impl IntoPy<Py<PyAssertionError>> for &PyAssertionError
gil-refs
only.impl IntoPy<Py<PyAttributeError>> for &PyAttributeError
gil-refs
only.impl IntoPy<Py<PyBaseException>> for &PyBaseException
gil-refs
only.impl IntoPy<Py<PyBlockingIOError>> for &PyBlockingIOError
gil-refs
only.impl IntoPy<Py<PyBrokenPipeError>> for &PyBrokenPipeError
gil-refs
only.impl IntoPy<Py<PyBufferError>> for &PyBufferError
gil-refs
only.impl IntoPy<Py<PyBytesWarning>> for &PyBytesWarning
gil-refs
only.impl IntoPy<Py<PyChildProcessError>> for &PyChildProcessError
gil-refs
only.impl IntoPy<Py<PyConnectionAbortedError>> for &PyConnectionAbortedError
gil-refs
only.impl IntoPy<Py<PyConnectionError>> for &PyConnectionError
gil-refs
only.impl IntoPy<Py<PyConnectionRefusedError>> for &PyConnectionRefusedError
gil-refs
only.impl IntoPy<Py<PyConnectionResetError>> for &PyConnectionResetError
gil-refs
only.impl IntoPy<Py<PyDeprecationWarning>> for &PyDeprecationWarning
gil-refs
only.impl IntoPy<Py<PyEOFError>> for &PyEOFError
gil-refs
only.impl IntoPy<Py<PyEncodingWarning>> for &PyEncodingWarning
gil-refs
only.impl IntoPy<Py<PyEnvironmentError>> for &PyEnvironmentError
gil-refs
only.impl IntoPy<Py<PyException>> for &PyException
gil-refs
only.impl IntoPy<Py<PyFileExistsError>> for &PyFileExistsError
gil-refs
only.impl IntoPy<Py<PyFileNotFoundError>> for &PyFileNotFoundError
gil-refs
only.impl IntoPy<Py<PyFloatingPointError>> for &PyFloatingPointError
gil-refs
only.impl IntoPy<Py<PyFutureWarning>> for &PyFutureWarning
gil-refs
only.impl IntoPy<Py<PyGeneratorExit>> for &PyGeneratorExit
gil-refs
only.impl IntoPy<Py<PyIOError>> for &PyIOError
gil-refs
only.impl IntoPy<Py<PyImportError>> for &PyImportError
gil-refs
only.impl IntoPy<Py<PyImportWarning>> for &PyImportWarning
gil-refs
only.impl IntoPy<Py<PyIndexError>> for &PyIndexError
gil-refs
only.impl IntoPy<Py<PyInterruptedError>> for &PyInterruptedError
gil-refs
only.impl IntoPy<Py<PyIsADirectoryError>> for &PyIsADirectoryError
gil-refs
only.impl IntoPy<Py<PyKeyError>> for &PyKeyError
gil-refs
only.impl IntoPy<Py<PyKeyboardInterrupt>> for &PyKeyboardInterrupt
gil-refs
only.impl IntoPy<Py<PyLookupError>> for &PyLookupError
gil-refs
only.impl IntoPy<Py<PyMemoryError>> for &PyMemoryError
gil-refs
only.impl IntoPy<Py<PyModuleNotFoundError>> for &PyModuleNotFoundError
gil-refs
only.impl IntoPy<Py<PyNameError>> for &PyNameError
gil-refs
only.impl IntoPy<Py<PyNotADirectoryError>> for &PyNotADirectoryError
gil-refs
only.impl IntoPy<Py<PyNotImplementedError>> for &PyNotImplementedError
gil-refs
only.impl IntoPy<Py<PyOSError>> for &PyOSError
gil-refs
only.impl IntoPy<Py<PyOverflowError>> for &PyOverflowError
gil-refs
only.impl IntoPy<Py<PyPendingDeprecationWarning>> for &PyPendingDeprecationWarning
gil-refs
only.impl IntoPy<Py<PyPermissionError>> for &PyPermissionError
gil-refs
only.impl IntoPy<Py<PyProcessLookupError>> for &PyProcessLookupError
gil-refs
only.impl IntoPy<Py<PyRecursionError>> for &PyRecursionError
gil-refs
only.impl IntoPy<Py<PyReferenceError>> for &PyReferenceError
gil-refs
only.impl IntoPy<Py<PyResourceWarning>> for &PyResourceWarning
gil-refs
only.impl IntoPy<Py<PyRuntimeError>> for &PyRuntimeError
gil-refs
only.impl IntoPy<Py<PyRuntimeWarning>> for &PyRuntimeWarning
gil-refs
only.impl IntoPy<Py<PyStopAsyncIteration>> for &PyStopAsyncIteration
gil-refs
only.impl IntoPy<Py<PyStopIteration>> for &PyStopIteration
gil-refs
only.impl IntoPy<Py<PySyntaxError>> for &PySyntaxError
gil-refs
only.impl IntoPy<Py<PySyntaxWarning>> for &PySyntaxWarning
gil-refs
only.impl IntoPy<Py<PySystemError>> for &PySystemError
gil-refs
only.impl IntoPy<Py<PySystemExit>> for &PySystemExit
gil-refs
only.impl IntoPy<Py<PyTimeoutError>> for &PyTimeoutError
gil-refs
only.impl IntoPy<Py<PyTypeError>> for &PyTypeError
gil-refs
only.impl IntoPy<Py<PyUnboundLocalError>> for &PyUnboundLocalError
gil-refs
only.impl IntoPy<Py<PyUnicodeDecodeError>> for &PyUnicodeDecodeError
gil-refs
only.impl IntoPy<Py<PyUnicodeEncodeError>> for &PyUnicodeEncodeError
gil-refs
only.impl IntoPy<Py<PyUnicodeError>> for &PyUnicodeError
gil-refs
only.impl IntoPy<Py<PyUnicodeTranslateError>> for &PyUnicodeTranslateError
gil-refs
only.impl IntoPy<Py<PyUnicodeWarning>> for &PyUnicodeWarning
gil-refs
only.impl IntoPy<Py<PyUserWarning>> for &PyUserWarning
gil-refs
only.impl IntoPy<Py<PyValueError>> for &PyValueError
gil-refs
only.impl IntoPy<Py<PyWarning>> for &PyWarning
gil-refs
only.impl IntoPy<Py<PyZeroDivisionError>> for &PyZeroDivisionError
gil-refs
only.impl IntoPy<Py<PanicException>> for &PanicException
gil-refs
only.impl IntoPy<Py<PyAny>> for &PyAny
impl IntoPy<Py<PyAny>> for Coroutine
experimental-async
only.impl IntoPy<Py<PyAny>> for PyErr
impl IntoPy<Py<PyAny>> for PyBackedBytes
impl IntoPy<Py<PyAny>> for PyBackedStr
impl IntoPy<Py<PyBool>> for &PyBool
gil-refs
only.impl IntoPy<Py<PyByteArray>> for &PyByteArray
gil-refs
only.impl IntoPy<Py<PyBytes>> for &PyBytes
gil-refs
only.impl IntoPy<Py<PyCFunction>> for &PyCFunction
gil-refs
only.impl IntoPy<Py<PyCapsule>> for &PyCapsule
gil-refs
only.impl IntoPy<Py<PyCode>> for &PyCode
Py_LIMITED_API
and non-PyPy
and non-GraalPy
and crate feature gil-refs
only.impl IntoPy<Py<PyComplex>> for &PyComplex
gil-refs
only.impl IntoPy<Py<PyDate>> for &PyDate
Py_LIMITED_API
and crate feature gil-refs
only.impl IntoPy<Py<PyDateTime>> for &PyDateTime
Py_LIMITED_API
and crate feature gil-refs
only.impl IntoPy<Py<PyDelta>> for &PyDelta
Py_LIMITED_API
and crate feature gil-refs
only.impl IntoPy<Py<PyDict>> for &PyDict
gil-refs
only.impl IntoPy<Py<PyDictItems>> for &PyDictItems
gil-refs
only.impl IntoPy<Py<PyDictKeys>> for &PyDictKeys
gil-refs
only.impl IntoPy<Py<PyDictValues>> for &PyDictValues
gil-refs
only.impl IntoPy<Py<PyEllipsis>> for &PyEllipsis
gil-refs
only.impl IntoPy<Py<PyFloat>> for &PyFloat
gil-refs
only.impl IntoPy<Py<PyFrame>> for &PyFrame
Py_LIMITED_API
and non-PyPy
and non-GraalPy
and crate feature gil-refs
only.impl IntoPy<Py<PyFrozenSet>> for &PyFrozenSet
gil-refs
only.impl IntoPy<Py<PyFunction>> for &PyFunction
gil-refs
only.impl IntoPy<Py<PyIterator>> for &PyIterator
gil-refs
only.impl IntoPy<Py<PyList>> for &PyList
gil-refs
only.impl IntoPy<Py<PyLong>> for &PyLong
gil-refs
only.impl IntoPy<Py<PyMapping>> for &PyMapping
gil-refs
only.impl IntoPy<Py<PyMemoryView>> for &PyMemoryView
gil-refs
only.impl IntoPy<Py<PyModule>> for &PyModule
gil-refs
only.impl IntoPy<Py<PyNone>> for &PyNone
gil-refs
only.impl IntoPy<Py<PyNotImplemented>> for &PyNotImplemented
gil-refs
only.impl IntoPy<Py<PySequence>> for &PySequence
gil-refs
only.impl IntoPy<Py<PySet>> for &PySet
gil-refs
only.impl IntoPy<Py<PySlice>> for &PySlice
gil-refs
only.impl IntoPy<Py<PyString>> for &Bound<'_, PyString>
impl IntoPy<Py<PyString>> for &Py<PyString>
impl IntoPy<Py<PyString>> for &PyString
gil-refs
only.impl IntoPy<Py<PyString>> for Bound<'_, PyString>
impl IntoPy<Py<PySuper>> for &PySuper
PyPy
nor GraalPy
and crate feature gil-refs
only.impl IntoPy<Py<PyTime>> for &PyTime
Py_LIMITED_API
and crate feature gil-refs
only.impl IntoPy<Py<PyTraceback>> for &PyTraceback
gil-refs
only.impl IntoPy<Py<PyTuple>> for &Bound<'_, PyTuple>
impl IntoPy<Py<PyTuple>> for &PyTuple
gil-refs
only.impl IntoPy<Py<PyTuple>> for Bound<'_, PyTuple>
impl IntoPy<Py<PyType>> for &PyType
gil-refs
only.impl IntoPy<Py<PyTzInfo>> for &PyTzInfo
Py_LIMITED_API
and crate feature gil-refs
only.impl IntoPy<Py<PyWeakref>> for &PyWeakref
gil-refs
only.impl IntoPy<Py<PyWeakrefProxy>> for &PyWeakrefProxy
gil-refs
only.impl IntoPy<Py<PyWeakrefReference>> for &PyWeakrefReference
gil-refs
only.