Trait pyo3::conversion::FromPyObject
source · pub trait FromPyObject<'source>: Sized {
// Required method
fn extract(ob: &'source PyAny) -> PyResult<Self>;
// Provided method
fn type_input() -> TypeInfo { ... }
}Expand description
Extract a type from a Python object.
Normal usage is through the extract methods on Py and PyAny, which forward to this trait.
§Examples
use pyo3::prelude::*;
use pyo3::types::PyString;
Python::with_gil(|py| {
let obj: Py<PyString> = PyString::new(py, "blah").into();
// Straight from an owned reference
let s: &str = obj.extract(py)?;
// Or from a borrowed reference
let obj: &PyString = obj.as_ref(py);
let s: &str = obj.extract()?;
})Note: depending on the implementation, the lifetime of the extracted result may
depend on the lifetime of the obj or the prepared variable.
For example, when extracting &str from a Python byte string, the resulting string slice will
point to the existing string data (lifetime: 'source).
On the other hand, when extracting &str from a Python Unicode string, the preparation step
will convert the string to UTF-8, and the resulting string slice will have lifetime 'prepared.
Since which case applies depends on the runtime type of the Python object,
both the obj and prepared variables must outlive the resulting string slice.
The trait’s conversion method takes a &PyAny argument but is called
FromPyObject for historical reasons.
Required Methods§
Provided Methods§
sourcefn type_input() -> TypeInfo
fn type_input() -> TypeInfo
experimental-inspect only.Extracts the type hint information for this type when it appears as an argument.
For example, Vec<u32> would return Sequence[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 IntoPy::type_output.
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 FromPyObject<'_> for char
impl FromPyObject<'_> for char
source§impl FromPyObject<'_> for String
impl FromPyObject<'_> for String
Allows extracting strings from Python objects.
Accepts Python str and unicode objects.
source§impl FromPyObject<'_> for DateTime<FixedOffset>
Available on crate feature chrono and non-Py_LIMITED_API only.
impl FromPyObject<'_> for DateTime<FixedOffset>
chrono and non-Py_LIMITED_API only.source§impl FromPyObject<'_> for DateTime<Utc>
Available on crate feature chrono and non-Py_LIMITED_API only.
impl FromPyObject<'_> for DateTime<Utc>
chrono and non-Py_LIMITED_API only.source§impl FromPyObject<'_> for NaiveDate
Available on crate feature chrono and non-Py_LIMITED_API only.
impl FromPyObject<'_> for NaiveDate
chrono and non-Py_LIMITED_API only.source§impl FromPyObject<'_> for NaiveDateTime
Available on crate feature chrono and non-Py_LIMITED_API only.
impl FromPyObject<'_> for NaiveDateTime
chrono and non-Py_LIMITED_API only.source§impl FromPyObject<'_> for NaiveTime
Available on crate feature chrono and non-Py_LIMITED_API only.
impl FromPyObject<'_> for NaiveTime
chrono and non-Py_LIMITED_API only.source§impl FromPyObject<'_> for FixedOffset
Available on crate feature chrono and non-Py_LIMITED_API only.
impl FromPyObject<'_> for FixedOffset
chrono and non-Py_LIMITED_API only.source§fn extract(ob: &PyAny) -> PyResult<FixedOffset>
fn extract(ob: &PyAny) -> PyResult<FixedOffset>
Convert python tzinfo to rust FixedOffset.
Note that the conversion will result in precision lost in microseconds as chrono offset does not supports microseconds.
source§impl FromPyObject<'_> for Utc
Available on crate feature chrono and non-Py_LIMITED_API only.
impl FromPyObject<'_> for Utc
chrono and non-Py_LIMITED_API only.source§impl FromPyObject<'_> for Decimal
Available on crate feature rust_decimal only.
impl FromPyObject<'_> for Decimal
rust_decimal only.source§impl FromPyObject<'_> for Duration
Available on crate feature chrono and non-Py_LIMITED_API only.
impl FromPyObject<'_> for Duration
chrono and non-Py_LIMITED_API only.source§impl<'a> FromPyObject<'a> for &'a [u8]
impl<'a> FromPyObject<'a> for &'a [u8]
source§impl<'a, A> FromPyObject<'a> for SmallVec<A>
Available on crate feature smallvec only.
impl<'a, A> FromPyObject<'a> for SmallVec<A>
smallvec only.source§impl<'a, T> FromPyObject<'a> for Option<T>where
T: FromPyObject<'a>,
impl<'a, T> FromPyObject<'a> for Option<T>where
T: FromPyObject<'a>,
source§impl<'a, T> FromPyObject<'a> for Vec<T>where
T: FromPyObject<'a>,
impl<'a, T> FromPyObject<'a> for Vec<T>where
T: FromPyObject<'a>,
source§impl<'a, T, const N: usize> FromPyObject<'a> for [T; N]where
T: FromPyObject<'a>,
impl<'a, T, const N: usize> FromPyObject<'a> for [T; N]where
T: FromPyObject<'a>,
source§impl<'a, T: FromPyObject<'a>> FromPyObject<'a> for Cell<T>
impl<'a, T: FromPyObject<'a>> FromPyObject<'a> for Cell<T>
source§impl<'s, T0: FromPyObject<'s>> FromPyObject<'s> for (T0,)
impl<'s, T0: FromPyObject<'s>> FromPyObject<'s> for (T0,)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>> FromPyObject<'s> for (T0, T1)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>> FromPyObject<'s> for (T0, T1)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>, T8: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>, T8: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>, T8: FromPyObject<'s>, T9: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>, T8: FromPyObject<'s>, T9: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>, T8: FromPyObject<'s>, T9: FromPyObject<'s>, T10: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>, T8: FromPyObject<'s>, T9: FromPyObject<'s>, T10: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
source§impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>, T8: FromPyObject<'s>, T9: FromPyObject<'s>, T10: FromPyObject<'s>, T11: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
impl<'s, T0: FromPyObject<'s>, T1: FromPyObject<'s>, T2: FromPyObject<'s>, T3: FromPyObject<'s>, T4: FromPyObject<'s>, T5: FromPyObject<'s>, T6: FromPyObject<'s>, T7: FromPyObject<'s>, T8: FromPyObject<'s>, T9: FromPyObject<'s>, T10: FromPyObject<'s>, T11: FromPyObject<'s>> FromPyObject<'s> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
source§impl<'source> FromPyObject<'source> for &'source str
impl<'source> FromPyObject<'source> for &'source str
Allows extracting strings from Python objects.
Accepts Python str and unicode objects.
source§impl<'source> FromPyObject<'source> for Cow<'source, [u8]>
impl<'source> FromPyObject<'source> for Cow<'source, [u8]>
Special-purpose trait impl to efficiently handle both bytes and bytearray
If the source object is a bytes object, the Cow will be borrowed and
pointing into the source object, and no copying or heap allocations will happen.
If it is a bytearray, its contents will be copied to an owned Cow.
source§impl<'source> FromPyObject<'source> for bool
impl<'source> FromPyObject<'source> for bool
Converts a Python bool to a Rust bool.
Fails with TypeError if the input is not a Python bool.
source§impl<'source> FromPyObject<'source> for f32
impl<'source> FromPyObject<'source> for f32
source§impl<'source> FromPyObject<'source> for f64
impl<'source> FromPyObject<'source> for f64
source§impl<'source> FromPyObject<'source> for i8
impl<'source> FromPyObject<'source> for i8
source§impl<'source> FromPyObject<'source> for i16
impl<'source> FromPyObject<'source> for i16
source§impl<'source> FromPyObject<'source> for i32
impl<'source> FromPyObject<'source> for i32
source§impl<'source> FromPyObject<'source> for i64
impl<'source> FromPyObject<'source> for i64
source§impl<'source> FromPyObject<'source> for i128
Available on non-Py_LIMITED_API only.
impl<'source> FromPyObject<'source> for i128
Py_LIMITED_API only.source§impl<'source> FromPyObject<'source> for isize
impl<'source> FromPyObject<'source> for isize
source§impl<'source> FromPyObject<'source> for u8
impl<'source> FromPyObject<'source> for u8
source§impl<'source> FromPyObject<'source> for u16
impl<'source> FromPyObject<'source> for u16
source§impl<'source> FromPyObject<'source> for u32
impl<'source> FromPyObject<'source> for u32
source§impl<'source> FromPyObject<'source> for u64
impl<'source> FromPyObject<'source> for u64
source§impl<'source> FromPyObject<'source> for u128
Available on non-Py_LIMITED_API only.
impl<'source> FromPyObject<'source> for u128
Py_LIMITED_API only.source§impl<'source> FromPyObject<'source> for usize
impl<'source> FromPyObject<'source> for usize
source§impl<'source> FromPyObject<'source> for BigInt
Available on crate feature num-bigint only.
impl<'source> FromPyObject<'source> for BigInt
num-bigint only.source§impl<'source> FromPyObject<'source> for BigUint
Available on crate feature num-bigint only.
impl<'source> FromPyObject<'source> for BigUint
num-bigint only.source§impl<'source> FromPyObject<'source> for Complex<f32>
Available on crate feature num-complex only.
impl<'source> FromPyObject<'source> for Complex<f32>
num-complex only.source§impl<'source> FromPyObject<'source> for Complex<f64>
Available on crate feature num-complex only.
impl<'source> FromPyObject<'source> for Complex<f64>
num-complex only.source§impl<'source> FromPyObject<'source> for NonZeroI8
impl<'source> FromPyObject<'source> for NonZeroI8
source§impl<'source> FromPyObject<'source> for NonZeroI16
impl<'source> FromPyObject<'source> for NonZeroI16
source§impl<'source> FromPyObject<'source> for NonZeroI32
impl<'source> FromPyObject<'source> for NonZeroI32
source§impl<'source> FromPyObject<'source> for NonZeroI64
impl<'source> FromPyObject<'source> for NonZeroI64
source§impl<'source> FromPyObject<'source> for NonZeroI128
impl<'source> FromPyObject<'source> for NonZeroI128
source§impl<'source> FromPyObject<'source> for NonZeroIsize
impl<'source> FromPyObject<'source> for NonZeroIsize
source§impl<'source> FromPyObject<'source> for NonZeroU8
impl<'source> FromPyObject<'source> for NonZeroU8
source§impl<'source> FromPyObject<'source> for NonZeroU16
impl<'source> FromPyObject<'source> for NonZeroU16
source§impl<'source> FromPyObject<'source> for NonZeroU32
impl<'source> FromPyObject<'source> for NonZeroU32
source§impl<'source> FromPyObject<'source> for NonZeroU64
impl<'source> FromPyObject<'source> for NonZeroU64
source§impl<'source> FromPyObject<'source> for NonZeroU128
impl<'source> FromPyObject<'source> for NonZeroU128
source§impl<'source> FromPyObject<'source> for NonZeroUsize
impl<'source> FromPyObject<'source> for NonZeroUsize
source§impl<'source, K> FromPyObject<'source> for BTreeSet<K>where
K: FromPyObject<'source> + Ord,
impl<'source, K> FromPyObject<'source> for BTreeSet<K>where
K: FromPyObject<'source> + Ord,
source§impl<'source, K, S> FromPyObject<'source> for HashSet<K, S>
impl<'source, K, S> FromPyObject<'source> for HashSet<K, S>
source§impl<'source, K, S> FromPyObject<'source> for HashSet<K, S>
Available on crate feature hashbrown only.
impl<'source, K, S> FromPyObject<'source> for HashSet<K, S>
hashbrown only.source§impl<'source, K, V> FromPyObject<'source> for BTreeMap<K, V>
impl<'source, K, V> FromPyObject<'source> for BTreeMap<K, V>
source§impl<'source, K, V, S> FromPyObject<'source> for HashMap<K, V, S>
impl<'source, K, V, S> FromPyObject<'source> for HashMap<K, V, S>
source§impl<'source, K, V, S> FromPyObject<'source> for HashMap<K, V, S>
Available on crate feature hashbrown only.
impl<'source, K, V, S> FromPyObject<'source> for HashMap<K, V, S>
hashbrown only.source§impl<'source, K, V, S> FromPyObject<'source> for IndexMap<K, V, S>
Available on crate feature indexmap only.
impl<'source, K, V, S> FromPyObject<'source> for IndexMap<K, V, S>
indexmap only.source§impl<'source, L, R> FromPyObject<'source> for Either<L, R>where
L: FromPyObject<'source>,
R: FromPyObject<'source>,
Available on crate feature either only.
impl<'source, L, R> FromPyObject<'source> for Either<L, R>where
L: FromPyObject<'source>,
R: FromPyObject<'source>,
either only.Implementors§
impl<'a, T> FromPyObject<'a> for &'a PyCell<T>where
T: PyClass,
impl<'a, T> FromPyObject<'a> for Py<T>
impl<'a, T> FromPyObject<'a> for PyRef<'a, T>where
T: PyClass,
impl<'a, T> FromPyObject<'a> for PyRefMut<'a, T>where
T: PyClass<Frozen = False>,
impl<'a, T> FromPyObject<'a> for T
impl<'py> FromPyObject<'py> for &'py CancelledError
impl<'py> FromPyObject<'py> for &'py IncompleteReadError
impl<'py> FromPyObject<'py> for &'py InvalidStateError
impl<'py> FromPyObject<'py> for &'py LimitOverrunError
impl<'py> FromPyObject<'py> for &'py QueueEmpty
impl<'py> FromPyObject<'py> for &'py QueueFull
impl<'py> FromPyObject<'py> for &'py TimeoutError
impl<'py> FromPyObject<'py> for &'py gaierror
impl<'py> FromPyObject<'py> for &'py herror
impl<'py> FromPyObject<'py> for &'py timeout
impl<'py> FromPyObject<'py> for &'py PyArithmeticError
impl<'py> FromPyObject<'py> for &'py PyAssertionError
impl<'py> FromPyObject<'py> for &'py PyAttributeError
impl<'py> FromPyObject<'py> for &'py PyBaseException
impl<'py> FromPyObject<'py> for &'py PyBlockingIOError
impl<'py> FromPyObject<'py> for &'py PyBrokenPipeError
impl<'py> FromPyObject<'py> for &'py PyBufferError
impl<'py> FromPyObject<'py> for &'py PyBytesWarning
impl<'py> FromPyObject<'py> for &'py PyChildProcessError
impl<'py> FromPyObject<'py> for &'py PyConnectionAbortedError
impl<'py> FromPyObject<'py> for &'py PyConnectionError
impl<'py> FromPyObject<'py> for &'py PyConnectionRefusedError
impl<'py> FromPyObject<'py> for &'py PyConnectionResetError
impl<'py> FromPyObject<'py> for &'py PyDeprecationWarning
impl<'py> FromPyObject<'py> for &'py PyEOFError
impl<'py> FromPyObject<'py> for &'py PyEncodingWarning
impl<'py> FromPyObject<'py> for &'py PyEnvironmentError
impl<'py> FromPyObject<'py> for &'py PyException
impl<'py> FromPyObject<'py> for &'py PyFileExistsError
impl<'py> FromPyObject<'py> for &'py PyFileNotFoundError
impl<'py> FromPyObject<'py> for &'py PyFloatingPointError
impl<'py> FromPyObject<'py> for &'py PyFutureWarning
impl<'py> FromPyObject<'py> for &'py PyGeneratorExit
impl<'py> FromPyObject<'py> for &'py PyIOError
impl<'py> FromPyObject<'py> for &'py PyImportError
impl<'py> FromPyObject<'py> for &'py PyImportWarning
impl<'py> FromPyObject<'py> for &'py PyIndexError
impl<'py> FromPyObject<'py> for &'py PyInterruptedError
impl<'py> FromPyObject<'py> for &'py PyIsADirectoryError
impl<'py> FromPyObject<'py> for &'py PyKeyError
impl<'py> FromPyObject<'py> for &'py PyKeyboardInterrupt
impl<'py> FromPyObject<'py> for &'py PyLookupError
impl<'py> FromPyObject<'py> for &'py PyMemoryError
impl<'py> FromPyObject<'py> for &'py PyModuleNotFoundError
impl<'py> FromPyObject<'py> for &'py PyNameError
impl<'py> FromPyObject<'py> for &'py PyNotADirectoryError
impl<'py> FromPyObject<'py> for &'py PyNotImplementedError
impl<'py> FromPyObject<'py> for &'py PyOSError
impl<'py> FromPyObject<'py> for &'py PyOverflowError
impl<'py> FromPyObject<'py> for &'py PyPendingDeprecationWarning
impl<'py> FromPyObject<'py> for &'py PyPermissionError
impl<'py> FromPyObject<'py> for &'py PyProcessLookupError
impl<'py> FromPyObject<'py> for &'py PyRecursionError
impl<'py> FromPyObject<'py> for &'py PyReferenceError
impl<'py> FromPyObject<'py> for &'py PyResourceWarning
impl<'py> FromPyObject<'py> for &'py PyRuntimeError
impl<'py> FromPyObject<'py> for &'py PyRuntimeWarning
impl<'py> FromPyObject<'py> for &'py PyStopAsyncIteration
impl<'py> FromPyObject<'py> for &'py PyStopIteration
impl<'py> FromPyObject<'py> for &'py PySyntaxError
impl<'py> FromPyObject<'py> for &'py PySyntaxWarning
impl<'py> FromPyObject<'py> for &'py PySystemError
impl<'py> FromPyObject<'py> for &'py PySystemExit
impl<'py> FromPyObject<'py> for &'py PyTimeoutError
impl<'py> FromPyObject<'py> for &'py PyTypeError
impl<'py> FromPyObject<'py> for &'py PyUnboundLocalError
impl<'py> FromPyObject<'py> for &'py PyUnicodeDecodeError
impl<'py> FromPyObject<'py> for &'py PyUnicodeEncodeError
impl<'py> FromPyObject<'py> for &'py PyUnicodeError
impl<'py> FromPyObject<'py> for &'py PyUnicodeTranslateError
impl<'py> FromPyObject<'py> for &'py PyUnicodeWarning
impl<'py> FromPyObject<'py> for &'py PyUserWarning
impl<'py> FromPyObject<'py> for &'py PyValueError
impl<'py> FromPyObject<'py> for &'py PyWarning
impl<'py> FromPyObject<'py> for &'py PyZeroDivisionError
impl<'py> FromPyObject<'py> for &'py PanicException
impl<'py> FromPyObject<'py> for &'py PyAny
impl<'py> FromPyObject<'py> for &'py PyBool
impl<'py> FromPyObject<'py> for &'py PyByteArray
impl<'py> FromPyObject<'py> for &'py PyBytes
impl<'py> FromPyObject<'py> for &'py PyCFunction
impl<'py> FromPyObject<'py> for &'py PyCapsule
impl<'py> FromPyObject<'py> for &'py PyCode
Py_LIMITED_API only.impl<'py> FromPyObject<'py> for &'py PyComplex
impl<'py> FromPyObject<'py> for &'py PyDate
Py_LIMITED_API only.impl<'py> FromPyObject<'py> for &'py PyDateTime
Py_LIMITED_API only.impl<'py> FromPyObject<'py> for &'py PyDelta
Py_LIMITED_API only.impl<'py> FromPyObject<'py> for &'py PyDict
impl<'py> FromPyObject<'py> for &'py PyDictItems
impl<'py> FromPyObject<'py> for &'py PyDictKeys
impl<'py> FromPyObject<'py> for &'py PyDictValues
impl<'py> FromPyObject<'py> for &'py PyEllipsis
impl<'py> FromPyObject<'py> for &'py PyFloat
impl<'py> FromPyObject<'py> for &'py PyFrame
Py_LIMITED_API and non-PyPy only.impl<'py> FromPyObject<'py> for &'py PyFrozenSet
impl<'py> FromPyObject<'py> for &'py PyFunction
impl<'py> FromPyObject<'py> for &'py PyIterator
impl<'py> FromPyObject<'py> for &'py PyList
impl<'py> FromPyObject<'py> for &'py PyLong
impl<'py> FromPyObject<'py> for &'py PyMapping
impl<'py> FromPyObject<'py> for &'py PyModule
impl<'py> FromPyObject<'py> for &'py PyNone
impl<'py> FromPyObject<'py> for &'py PyNotImplemented
impl<'py> FromPyObject<'py> for &'py PySequence
impl<'py> FromPyObject<'py> for &'py PySet
impl<'py> FromPyObject<'py> for &'py PySlice
impl<'py> FromPyObject<'py> for &'py PyString
impl<'py> FromPyObject<'py> for &'py PySuper
PyPy only.impl<'py> FromPyObject<'py> for &'py PyTime
Py_LIMITED_API only.impl<'py> FromPyObject<'py> for &'py PyTraceback
impl<'py> FromPyObject<'py> for &'py PyTuple
impl<'py> FromPyObject<'py> for &'py PyType
impl<'py> FromPyObject<'py> for &'py PyTzInfo
Py_LIMITED_API only.impl<'source, T: Element> FromPyObject<'source> for PyBuffer<T>
Py_LIMITED_API or Py_3_11 only.