pub trait IntoPyObject<'py>: Sized {
type Target;
type Output: BoundObject<'py, Self::Target>;
type Error: Into<PyErr>;
const OUTPUT_TYPE: PyStaticExpr = _;
// Required method
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>;
}Expand description
Defines a conversion from a Rust type to a Python object, which may fail.
This trait has #[derive(IntoPyObject)] to automatically implement it for simple types and
#[derive(IntoPyObjectRef)] to implement the same for references.
It functions similarly to std’s TryInto trait, but requires a Python<'py> token
as an argument.
The into_pyobject method is designed for maximum flexibility and efficiency; it
- allows for a concrete Python type to be returned (the
Targetassociated type) - allows for the smart pointer containing the Python object to be either
Bound<'py, Self::Target>orBorrowed<'a, 'py, Self::Target>to avoid unnecessary reference counting overhead - allows for a custom error type to be returned in the event of a conversion error to avoid unnecessarily creating a Python exception
§See also
- The
IntoPyObjectExttrait, which provides convenience methods for common usages ofIntoPyObjectwhich erase type information and convert errors toPyErr.
Provided Associated Constants§
Sourceconst OUTPUT_TYPE: PyStaticExpr = _
const OUTPUT_TYPE: PyStaticExpr = _
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::INPUT_TYPE.
It may be different for some types, such as Dict, to allow duck-typing: functions return Dict but take Mapping as argument.
Required Associated Types§
Sourcetype Output: BoundObject<'py, Self::Target>
type Output: BoundObject<'py, Self::Target>
The smart pointer type to use.
This will usually be Bound<'py, Target>, but in special cases Borrowed<'a, 'py, Target> can be
used to minimize reference counting overhead.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<'a, 'py, A> IntoPyObject<'py> for &'a SmallVec<A>where
A: Array,
&'a A::Item: IntoPyObject<'py>,
impl<'a, 'py, A> IntoPyObject<'py> for &'a SmallVec<A>where
A: Array,
&'a A::Item: IntoPyObject<'py>,
Source§impl<'a, 'py, K, H> IntoPyObject<'py> for &'a HashSet<K, H>
impl<'a, 'py, K, H> IntoPyObject<'py> for &'a HashSet<K, H>
Source§impl<'a, 'py, K, H> IntoPyObject<'py> for &'a HashSet<K, H>
impl<'a, 'py, K, H> IntoPyObject<'py> for &'a HashSet<K, H>
Source§impl<'a, 'py, K, V, H> IntoPyObject<'py> for &'a HashMap<K, V, H>
impl<'a, 'py, K, V, H> IntoPyObject<'py> for &'a HashMap<K, V, H>
Source§impl<'a, 'py, K, V, H> IntoPyObject<'py> for &'a HashMap<K, V, H>
impl<'a, 'py, K, V, H> IntoPyObject<'py> for &'a HashMap<K, V, H>
Source§impl<'a, 'py, K, V, H> IntoPyObject<'py> for &'a IndexMap<K, V, H>
impl<'a, 'py, K, V, H> IntoPyObject<'py> for &'a IndexMap<K, V, H>
Source§impl<'a, 'py, K, V> IntoPyObject<'py> for &'a BTreeMap<K, V>
impl<'a, 'py, K, V> IntoPyObject<'py> for &'a BTreeMap<K, V>
Source§impl<'a, 'py, K> IntoPyObject<'py> for &'a BTreeSet<K>
impl<'a, 'py, K> IntoPyObject<'py> for &'a BTreeSet<K>
Source§impl<'a, 'py, L, R> IntoPyObject<'py> for &'a Either<L, R>
impl<'a, 'py, L, R> IntoPyObject<'py> for &'a Either<L, R>
Source§impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
&'a T8: IntoPyObject<'py>,
&'a T9: IntoPyObject<'py>,
&'a T10: IntoPyObject<'py>,
&'a T11: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
&'a T8: IntoPyObject<'py>,
&'a T9: IntoPyObject<'py>,
&'a T10: IntoPyObject<'py>,
&'a T11: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
&'a T8: IntoPyObject<'py>,
&'a T9: IntoPyObject<'py>,
&'a T10: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
&'a T8: IntoPyObject<'py>,
&'a T9: IntoPyObject<'py>,
&'a T10: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
&'a T8: IntoPyObject<'py>,
&'a T9: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
&'a T8: IntoPyObject<'py>,
&'a T9: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
&'a T8: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
&'a T8: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6, T7> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6, T7)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
&'a T7: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3, T4, T5, T6> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5, T6)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
&'a T6: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2, T3, T4, T5> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3, T4, T5> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4, T5)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
&'a T5: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2, T3, T4> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3, T4> IntoPyObject<'py> for &'a (T0, T1, T2, T3, T4)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
&'a T4: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2, T3> IntoPyObject<'py> for &'a (T0, T1, T2, T3)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
impl<'a, 'py, T0, T1, T2, T3> IntoPyObject<'py> for &'a (T0, T1, T2, T3)where
&'a T0: IntoPyObject<'py>,
&'a T1: IntoPyObject<'py>,
&'a T2: IntoPyObject<'py>,
&'a T3: IntoPyObject<'py>,
Source§impl<'a, 'py, T0, T1, T2> IntoPyObject<'py> for &'a (T0, T1, T2)
impl<'a, 'py, T0, T1, T2> IntoPyObject<'py> for &'a (T0, T1, T2)
Source§impl<'a, 'py, T0, T1> IntoPyObject<'py> for &'a (T0, T1)
impl<'a, 'py, T0, T1> IntoPyObject<'py> for &'a (T0, T1)
Source§impl<'a, 'py, T0> IntoPyObject<'py> for &'a (T0,)where
&'a T0: IntoPyObject<'py>,
impl<'a, 'py, T0> IntoPyObject<'py> for &'a (T0,)where
&'a T0: IntoPyObject<'py>,
Source§impl<'a, 'py, T, const N: usize> IntoPyObject<'py> for &'a [T; N]where
&'a T: IntoPyObject<'py>,
impl<'a, 'py, T, const N: usize> IntoPyObject<'py> for &'a [T; N]where
&'a T: IntoPyObject<'py>,
Source§impl<'a, 'py, T> IntoPyObject<'py> for &&'a Twhere
&'a T: IntoPyObject<'py>,
impl<'a, 'py, T> IntoPyObject<'py> for &&'a Twhere
&'a T: IntoPyObject<'py>,
const OUTPUT_TYPE: PyStaticExpr
type Target = <&'a T as IntoPyObject<'py>>::Target
type Output = <&'a T as IntoPyObject<'py>>::Output
type Error = <&'a T as IntoPyObject<'py>>::Error
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'a, 'py, T> IntoPyObject<'py> for &'a Option<T>where
&'a T: IntoPyObject<'py>,
impl<'a, 'py, T> IntoPyObject<'py> for &'a Option<T>where
&'a T: IntoPyObject<'py>,
const OUTPUT_TYPE: PyStaticExpr = Option<&T>::OUTPUT_TYPE
type Target = PyAny
type Output = Bound<'py, <&'a Option<T> as IntoPyObject<'py>>::Target>
type Error = <&'a T as IntoPyObject<'py>>::Error
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'a, 'py, T> IntoPyObject<'py> for &'a Vec<T>where
&'a T: IntoPyObject<'py>,
impl<'a, 'py, T> IntoPyObject<'py> for &'a Vec<T>where
&'a T: IntoPyObject<'py>,
Source§impl<'a, 'py, T> IntoPyObject<'py> for &'a [T]where
&'a T: IntoPyObject<'py>,
impl<'a, 'py, T> IntoPyObject<'py> for &'a [T]where
&'a T: IntoPyObject<'py>,
Source§impl<'py, A> IntoPyObject<'py> for SmallVec<A>where
A: Array,
A::Item: IntoPyObject<'py>,
impl<'py, A> IntoPyObject<'py> for SmallVec<A>where
A: Array,
A::Item: IntoPyObject<'py>,
Source§impl<'py, K, H> IntoPyObject<'py> for HashSet<K, H>
impl<'py, K, H> IntoPyObject<'py> for HashSet<K, H>
Source§impl<'py, K, S> IntoPyObject<'py> for HashSet<K, S>
impl<'py, K, S> IntoPyObject<'py> for HashSet<K, S>
Source§impl<'py, K, V, H> IntoPyObject<'py> for HashMap<K, V, H>
impl<'py, K, V, H> IntoPyObject<'py> for HashMap<K, V, H>
Source§impl<'py, K, V, H> IntoPyObject<'py> for HashMap<K, V, H>
impl<'py, K, V, H> IntoPyObject<'py> for HashMap<K, V, H>
Source§impl<'py, K, V, H> IntoPyObject<'py> for IndexMap<K, V, H>
impl<'py, K, V, H> IntoPyObject<'py> for IndexMap<K, V, H>
Source§impl<'py, K, V> IntoPyObject<'py> for BTreeMap<K, V>
impl<'py, K, V> IntoPyObject<'py> for BTreeMap<K, V>
Source§impl<'py, K> IntoPyObject<'py> for BTreeSet<K>where
K: IntoPyObject<'py> + Ord,
impl<'py, K> IntoPyObject<'py> for BTreeSet<K>where
K: IntoPyObject<'py> + Ord,
Source§impl<'py, L, R> IntoPyObject<'py> for Either<L, R>where
L: IntoPyObject<'py>,
R: IntoPyObject<'py>,
impl<'py, L, R> IntoPyObject<'py> for Either<L, R>where
L: IntoPyObject<'py>,
R: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
T8: IntoPyObject<'py>,
T9: IntoPyObject<'py>,
T10: IntoPyObject<'py>,
T11: IntoPyObject<'py>,
impl<'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
T8: IntoPyObject<'py>,
T9: IntoPyObject<'py>,
T10: IntoPyObject<'py>,
T11: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
T8: IntoPyObject<'py>,
T9: IntoPyObject<'py>,
T10: IntoPyObject<'py>,
impl<'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
T8: IntoPyObject<'py>,
T9: IntoPyObject<'py>,
T10: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
T8: IntoPyObject<'py>,
T9: IntoPyObject<'py>,
impl<'py, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
T8: IntoPyObject<'py>,
T9: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
T8: IntoPyObject<'py>,
impl<'py, T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
T8: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3, T4, T5, T6, T7> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
impl<'py, T0, T1, T2, T3, T4, T5, T6, T7> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6, T7)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
T7: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3, T4, T5, T6> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
impl<'py, T0, T1, T2, T3, T4, T5, T6> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5, T6)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
T6: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3, T4, T5> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
impl<'py, T0, T1, T2, T3, T4, T5> IntoPyObject<'py> for (T0, T1, T2, T3, T4, T5)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
T5: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3, T4> IntoPyObject<'py> for (T0, T1, T2, T3, T4)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
impl<'py, T0, T1, T2, T3, T4> IntoPyObject<'py> for (T0, T1, T2, T3, T4)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
T2: IntoPyObject<'py>,
T3: IntoPyObject<'py>,
T4: IntoPyObject<'py>,
Source§impl<'py, T0, T1, T2, T3> IntoPyObject<'py> for (T0, T1, T2, T3)
impl<'py, T0, T1, T2, T3> IntoPyObject<'py> for (T0, T1, T2, T3)
Source§impl<'py, T0, T1, T2> IntoPyObject<'py> for (T0, T1, T2)
impl<'py, T0, T1, T2> IntoPyObject<'py> for (T0, T1, T2)
Source§impl<'py, T0, T1> IntoPyObject<'py> for (T0, T1)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
impl<'py, T0, T1> IntoPyObject<'py> for (T0, T1)where
T0: IntoPyObject<'py>,
T1: IntoPyObject<'py>,
Source§impl<'py, T0> IntoPyObject<'py> for (T0,)where
T0: IntoPyObject<'py>,
impl<'py, T0> IntoPyObject<'py> for (T0,)where
T0: IntoPyObject<'py>,
Source§impl<'py, T, const N: usize> IntoPyObject<'py> for [T; N]where
T: IntoPyObject<'py>,
impl<'py, T, const N: usize> IntoPyObject<'py> for [T; N]where
T: IntoPyObject<'py>,
Source§impl<'py, T: Copy + IntoPyObject<'py>> IntoPyObject<'py> for &Cell<T>
impl<'py, T: Copy + IntoPyObject<'py>> IntoPyObject<'py> for &Cell<T>
const OUTPUT_TYPE: PyStaticExpr = T::OUTPUT_TYPE
type Target = <T as IntoPyObject<'py>>::Target
type Output = <T as IntoPyObject<'py>>::Output
type Error = <T as IntoPyObject<'py>>::Error
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py, T: Copy + IntoPyObject<'py>> IntoPyObject<'py> for Cell<T>
impl<'py, T: Copy + IntoPyObject<'py>> IntoPyObject<'py> for Cell<T>
const OUTPUT_TYPE: PyStaticExpr = T::OUTPUT_TYPE
type Target = <T as IntoPyObject<'py>>::Target
type Output = <T as IntoPyObject<'py>>::Output
type Error = <T as IntoPyObject<'py>>::Error
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py, T> IntoPyObject<'py> for Cow<'_, [T]>
impl<'py, T> IntoPyObject<'py> for Cow<'_, [T]>
Source§impl<'py, T> IntoPyObject<'py> for Option<T>where
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObject<'py> for Option<T>where
T: IntoPyObject<'py>,
Source§impl<'py, T> IntoPyObject<'py> for Vec<T>where
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObject<'py> for Vec<T>where
T: IntoPyObject<'py>,
Source§impl<'py, Tz> IntoPyObject<'py> for &DateTime<Tz>where
Tz: IntoPyObject<'py> + TimeZone,
impl<'py, Tz> IntoPyObject<'py> for &DateTime<Tz>where
Tz: IntoPyObject<'py> + TimeZone,
Source§impl<'py, Tz> IntoPyObject<'py> for DateTime<Tz>where
Tz: IntoPyObject<'py> + TimeZone,
impl<'py, Tz> IntoPyObject<'py> for DateTime<Tz>where
Tz: IntoPyObject<'py> + TimeZone,
Source§impl<'py> IntoPyObject<'py> for &&OsStr
impl<'py> IntoPyObject<'py> for &&OsStr
Source§impl<'py> IntoPyObject<'py> for &&Path
impl<'py> IntoPyObject<'py> for &&Path
Source§impl<'py> IntoPyObject<'py> for &&str
impl<'py> IntoPyObject<'py> for &&str
Source§impl<'py> IntoPyObject<'py> for &BigInt
impl<'py> IntoPyObject<'py> for &BigInt
Source§impl<'py> IntoPyObject<'py> for &BigUint
impl<'py> IntoPyObject<'py> for &BigUint
Source§impl<'py> IntoPyObject<'py> for &Bytes
impl<'py> IntoPyObject<'py> for &Bytes
Source§impl<'py> IntoPyObject<'py> for &CStr
impl<'py> IntoPyObject<'py> for &CStr
Source§impl<'py> IntoPyObject<'py> for &CString
impl<'py> IntoPyObject<'py> for &CString
Source§impl<'py> IntoPyObject<'py> for &Complex<f32>
impl<'py> IntoPyObject<'py> for &Complex<f32>
Source§impl<'py> IntoPyObject<'py> for &Complex<f64>
impl<'py> IntoPyObject<'py> for &Complex<f64>
Source§impl<'py> IntoPyObject<'py> for &Cow<'_, CStr>
impl<'py> IntoPyObject<'py> for &Cow<'_, CStr>
Source§impl<'py> IntoPyObject<'py> for &Cow<'_, OsStr>
impl<'py> IntoPyObject<'py> for &Cow<'_, OsStr>
Source§impl<'py> IntoPyObject<'py> for &Cow<'_, Path>
impl<'py> IntoPyObject<'py> for &Cow<'_, Path>
Source§impl<'py> IntoPyObject<'py> for &Cow<'_, str>
impl<'py> IntoPyObject<'py> for &Cow<'_, str>
Source§impl<'py> IntoPyObject<'py> for &Date
impl<'py> IntoPyObject<'py> for &Date
Source§impl<'py> IntoPyObject<'py> for &Date
impl<'py> IntoPyObject<'py> for &Date
Source§impl<'py> IntoPyObject<'py> for &DateTime
impl<'py> IntoPyObject<'py> for &DateTime
const OUTPUT_TYPE: PyStaticExpr = DateTime::OUTPUT_TYPE
type Target = PyDateTime
type Output = Bound<'py, <&DateTime as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for &Decimal
impl<'py> IntoPyObject<'py> for &Decimal
Source§impl<'py> IntoPyObject<'py> for &Duration
impl<'py> IntoPyObject<'py> for &Duration
Source§impl<'py> IntoPyObject<'py> for &Duration
impl<'py> IntoPyObject<'py> for &Duration
Source§impl<'py> IntoPyObject<'py> for &Duration
impl<'py> IntoPyObject<'py> for &Duration
Source§impl<'py> IntoPyObject<'py> for &FixedOffset
impl<'py> IntoPyObject<'py> for &FixedOffset
Source§impl<'py> IntoPyObject<'py> for &ISOWeekDate
impl<'py> IntoPyObject<'py> for &ISOWeekDate
Source§impl<'py> IntoPyObject<'py> for &IpAddr
impl<'py> IntoPyObject<'py> for &IpAddr
Source§impl<'py> IntoPyObject<'py> for &Ipv4Addr
impl<'py> IntoPyObject<'py> for &Ipv4Addr
Source§impl<'py> IntoPyObject<'py> for &Ipv6Addr
impl<'py> IntoPyObject<'py> for &Ipv6Addr
Source§impl<'py> IntoPyObject<'py> for &Local
Available on crate feature chrono-local only.
impl<'py> IntoPyObject<'py> for &Local
chrono-local only.Source§impl<'py> IntoPyObject<'py> for &NaiveDate
impl<'py> IntoPyObject<'py> for &NaiveDate
Source§impl<'py> IntoPyObject<'py> for &NaiveDateTime
impl<'py> IntoPyObject<'py> for &NaiveDateTime
const OUTPUT_TYPE: PyStaticExpr = NaiveDateTime::OUTPUT_TYPE
type Target = PyDateTime
type Output = Bound<'py, <&NaiveDateTime as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for &NaiveTime
impl<'py> IntoPyObject<'py> for &NaiveTime
Source§impl<'py> IntoPyObject<'py> for &NonNilUuid
impl<'py> IntoPyObject<'py> for &NonNilUuid
Source§impl<'py> IntoPyObject<'py> for &NonZeroI8
impl<'py> IntoPyObject<'py> for &NonZeroI8
Source§impl<'py> IntoPyObject<'py> for &NonZeroI16
impl<'py> IntoPyObject<'py> for &NonZeroI16
Source§impl<'py> IntoPyObject<'py> for &NonZeroI32
impl<'py> IntoPyObject<'py> for &NonZeroI32
Source§impl<'py> IntoPyObject<'py> for &NonZeroI64
impl<'py> IntoPyObject<'py> for &NonZeroI64
Source§impl<'py> IntoPyObject<'py> for &NonZeroI128
impl<'py> IntoPyObject<'py> for &NonZeroI128
Source§impl<'py> IntoPyObject<'py> for &NonZeroIsize
impl<'py> IntoPyObject<'py> for &NonZeroIsize
Source§impl<'py> IntoPyObject<'py> for &NonZeroU8
impl<'py> IntoPyObject<'py> for &NonZeroU8
Source§impl<'py> IntoPyObject<'py> for &NonZeroU16
impl<'py> IntoPyObject<'py> for &NonZeroU16
Source§impl<'py> IntoPyObject<'py> for &NonZeroU32
impl<'py> IntoPyObject<'py> for &NonZeroU32
Source§impl<'py> IntoPyObject<'py> for &NonZeroU64
impl<'py> IntoPyObject<'py> for &NonZeroU64
Source§impl<'py> IntoPyObject<'py> for &NonZeroU128
impl<'py> IntoPyObject<'py> for &NonZeroU128
Source§impl<'py> IntoPyObject<'py> for &NonZeroUsize
impl<'py> IntoPyObject<'py> for &NonZeroUsize
Source§impl<'py> IntoPyObject<'py> for &NotNan<f32>
impl<'py> IntoPyObject<'py> for &NotNan<f32>
Source§impl<'py> IntoPyObject<'py> for &NotNan<f64>
impl<'py> IntoPyObject<'py> for &NotNan<f64>
Source§impl<'py> IntoPyObject<'py> for &Offset
impl<'py> IntoPyObject<'py> for &Offset
Source§impl<'py> IntoPyObject<'py> for &OffsetDateTime
impl<'py> IntoPyObject<'py> for &OffsetDateTime
const OUTPUT_TYPE: PyStaticExpr = OffsetDateTime::OUTPUT_TYPE
type Target = PyDateTime
type Output = Bound<'py, <&OffsetDateTime as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for &OrderedFloat<f32>
impl<'py> IntoPyObject<'py> for &OrderedFloat<f32>
Source§impl<'py> IntoPyObject<'py> for &OrderedFloat<f64>
impl<'py> IntoPyObject<'py> for &OrderedFloat<f64>
Source§impl<'py> IntoPyObject<'py> for &OsStr
impl<'py> IntoPyObject<'py> for &OsStr
Source§impl<'py> IntoPyObject<'py> for &OsString
impl<'py> IntoPyObject<'py> for &OsString
Source§impl<'py> IntoPyObject<'py> for &Path
impl<'py> IntoPyObject<'py> for &Path
Source§impl<'py> IntoPyObject<'py> for &PathBuf
impl<'py> IntoPyObject<'py> for &PathBuf
Source§impl<'py> IntoPyObject<'py> for &PrimitiveDateTime
impl<'py> IntoPyObject<'py> for &PrimitiveDateTime
const OUTPUT_TYPE: PyStaticExpr = PrimitiveDateTime::OUTPUT_TYPE
type Target = PyDateTime
type Output = Bound<'py, <&PrimitiveDateTime as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for &Ratio<BigInt>
impl<'py> IntoPyObject<'py> for &Ratio<BigInt>
Source§impl<'py> IntoPyObject<'py> for &Ratio<i8>
impl<'py> IntoPyObject<'py> for &Ratio<i8>
Source§impl<'py> IntoPyObject<'py> for &Ratio<i16>
impl<'py> IntoPyObject<'py> for &Ratio<i16>
Source§impl<'py> IntoPyObject<'py> for &Ratio<i32>
impl<'py> IntoPyObject<'py> for &Ratio<i32>
Source§impl<'py> IntoPyObject<'py> for &Ratio<i64>
impl<'py> IntoPyObject<'py> for &Ratio<i64>
Source§impl<'py> IntoPyObject<'py> for &Ratio<isize>
impl<'py> IntoPyObject<'py> for &Ratio<isize>
Source§impl<'py> IntoPyObject<'py> for &SignedDuration
impl<'py> IntoPyObject<'py> for &SignedDuration
Source§impl<'py> IntoPyObject<'py> for &String
impl<'py> IntoPyObject<'py> for &String
Source§impl<'py> IntoPyObject<'py> for &SystemTime
impl<'py> IntoPyObject<'py> for &SystemTime
const OUTPUT_TYPE: PyStaticExpr = SystemTime::OUTPUT_TYPE
type Target = PyDateTime
type Output = Bound<'py, <&SystemTime as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for &Time
impl<'py> IntoPyObject<'py> for &Time
Source§impl<'py> IntoPyObject<'py> for &Time
impl<'py> IntoPyObject<'py> for &Time
Source§impl<'py> IntoPyObject<'py> for &TimeZone
impl<'py> IntoPyObject<'py> for &TimeZone
Source§impl<'py> IntoPyObject<'py> for &Timestamp
impl<'py> IntoPyObject<'py> for &Timestamp
const OUTPUT_TYPE: PyStaticExpr = Timestamp::OUTPUT_TYPE
type Target = PyDateTime
type Output = Bound<'py, <&Timestamp as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for &Tz
impl<'py> IntoPyObject<'py> for &Tz
Source§impl<'py> IntoPyObject<'py> for &Utc
impl<'py> IntoPyObject<'py> for &Utc
Source§impl<'py> IntoPyObject<'py> for &UtcDateTime
impl<'py> IntoPyObject<'py> for &UtcDateTime
const OUTPUT_TYPE: PyStaticExpr = UtcDateTime::OUTPUT_TYPE
type Target = PyDateTime
type Output = Bound<'py, <&UtcDateTime as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for &UtcOffset
impl<'py> IntoPyObject<'py> for &UtcOffset
Source§impl<'py> IntoPyObject<'py> for &Uuid
impl<'py> IntoPyObject<'py> for &Uuid
Source§impl<'py> IntoPyObject<'py> for &Zoned
impl<'py> IntoPyObject<'py> for &Zoned
const OUTPUT_TYPE: PyStaticExpr = PyDateTime::TYPE_HINT
type Target = PyDateTime
type Output = Bound<'py, <&Zoned as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for &bool
impl<'py> IntoPyObject<'py> for &bool
Source§impl<'py> IntoPyObject<'py> for &char
impl<'py> IntoPyObject<'py> for &char
Source§impl<'py> IntoPyObject<'py> for &f32
impl<'py> IntoPyObject<'py> for &f32
Source§impl<'py> IntoPyObject<'py> for &f64
impl<'py> IntoPyObject<'py> for &f64
Source§impl<'py> IntoPyObject<'py> for &i8
impl<'py> IntoPyObject<'py> for &i8
Source§impl<'py> IntoPyObject<'py> for &i16
impl<'py> IntoPyObject<'py> for &i16
Source§impl<'py> IntoPyObject<'py> for &i32
impl<'py> IntoPyObject<'py> for &i32
Source§impl<'py> IntoPyObject<'py> for &i64
impl<'py> IntoPyObject<'py> for &i64
Source§impl<'py> IntoPyObject<'py> for &i128
impl<'py> IntoPyObject<'py> for &i128
Source§impl<'py> IntoPyObject<'py> for &isize
impl<'py> IntoPyObject<'py> for &isize
Source§impl<'py> IntoPyObject<'py> for &str
impl<'py> IntoPyObject<'py> for &str
Source§impl<'py> IntoPyObject<'py> for &u8
impl<'py> IntoPyObject<'py> for &u8
Source§impl<'py> IntoPyObject<'py> for &u16
impl<'py> IntoPyObject<'py> for &u16
Source§impl<'py> IntoPyObject<'py> for &u32
impl<'py> IntoPyObject<'py> for &u32
Source§impl<'py> IntoPyObject<'py> for &u64
impl<'py> IntoPyObject<'py> for &u64
Source§impl<'py> IntoPyObject<'py> for &u128
impl<'py> IntoPyObject<'py> for &u128
Source§impl<'py> IntoPyObject<'py> for &usize
impl<'py> IntoPyObject<'py> for &usize
Source§impl<'py> IntoPyObject<'py> for ()
impl<'py> IntoPyObject<'py> for ()
Source§impl<'py> IntoPyObject<'py> for BigDecimal
impl<'py> IntoPyObject<'py> for BigDecimal
Source§impl<'py> IntoPyObject<'py> for BigInt
impl<'py> IntoPyObject<'py> for BigInt
Source§impl<'py> IntoPyObject<'py> for BigUint
impl<'py> IntoPyObject<'py> for BigUint
Source§impl<'py> IntoPyObject<'py> for Bytes
impl<'py> IntoPyObject<'py> for Bytes
Source§impl<'py> IntoPyObject<'py> for CString
impl<'py> IntoPyObject<'py> for CString
Source§impl<'py> IntoPyObject<'py> for Complex<f32>
impl<'py> IntoPyObject<'py> for Complex<f32>
Source§impl<'py> IntoPyObject<'py> for Complex<f64>
impl<'py> IntoPyObject<'py> for Complex<f64>
Source§impl<'py> IntoPyObject<'py> for Cow<'_, CStr>
impl<'py> IntoPyObject<'py> for Cow<'_, CStr>
Source§impl<'py> IntoPyObject<'py> for Cow<'_, OsStr>
impl<'py> IntoPyObject<'py> for Cow<'_, OsStr>
Source§impl<'py> IntoPyObject<'py> for Cow<'_, Path>
impl<'py> IntoPyObject<'py> for Cow<'_, Path>
Source§impl<'py> IntoPyObject<'py> for Cow<'_, str>
impl<'py> IntoPyObject<'py> for Cow<'_, str>
Source§impl<'py> IntoPyObject<'py> for Date
impl<'py> IntoPyObject<'py> for Date
Source§impl<'py> IntoPyObject<'py> for Date
impl<'py> IntoPyObject<'py> for Date
Source§impl<'py> IntoPyObject<'py> for DateTime
impl<'py> IntoPyObject<'py> for DateTime
const OUTPUT_TYPE: PyStaticExpr = PyDateTime::TYPE_HINT
type Target = PyDateTime
type Output = Bound<'py, <DateTime as IntoPyObject<'py>>::Target>
type Error = PyErr
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Source§impl<'py> IntoPyObject<'py> for Decimal
impl<'py> IntoPyObject<'py> for Decimal
Source§impl<'py> IntoPyObject<'py> for Duration
impl<'py> IntoPyObject<'py> for Duration
Source§impl<'py> IntoPyObject<'py> for Duration
impl<'py> IntoPyObject<'py> for Duration
Source§impl<'py> IntoPyObject<'py> for Duration
impl<'py> IntoPyObject<'py> for Duration
Source§impl<'py> IntoPyObject<'py> for FixedOffset
impl<'py> IntoPyObject<'py> for FixedOffset
Source§impl<'py> IntoPyObject<'py> for ISOWeekDate
impl<'py> IntoPyObject<'py> for ISOWeekDate
Source§impl<'py> IntoPyObject<'py> for IpAddr
impl<'py> IntoPyObject<'py> for IpAddr
Source§impl<'py> IntoPyObject<'py> for Ipv4Addr
impl<'py> IntoPyObject<'py> for Ipv4Addr
Source§impl<'py> IntoPyObject<'py> for Ipv6Addr
impl<'py> IntoPyObject<'py> for Ipv6Addr
Source§impl<'py> IntoPyObject<'py> for Local
Available on crate feature chrono-local only.
impl<'py> IntoPyObject<'py> for Local
chrono-local only.