pub trait TryIntoPyObjectUnsafe<'py, P> {
// Required method
unsafe fn try_to_object_unsafe(
self,
py: Python<'py>,
) -> PyResult<Bound<'py, P>>;
}
Expand description
A variant of pyo3::IntoPyObject
used to wrap unsafe impls and propagates the
unsafety to the caller.
Required Methods§
unsafe fn try_to_object_unsafe(self, py: Python<'py>) -> PyResult<Bound<'py, P>>
Implementations on Foreign Types§
Source§impl<'a, 'py, K, V> TryIntoPyObjectUnsafe<'py, PyDict> for &'a HashMap<K, V>
Helper impl for casting into kwargs for python functions calls.
impl<'a, 'py, K, V> TryIntoPyObjectUnsafe<'py, PyDict> for &'a HashMap<K, V>
Helper impl for casting into kwargs for python functions calls.
unsafe fn try_to_object_unsafe( self, py: Python<'py>, ) -> PyResult<Bound<'py, PyDict>>
Source§impl<'a, 'py, T> TryIntoPyObjectUnsafe<'py, PyTuple> for &'a Vec<T>where
&'a T: TryIntoPyObjectUnsafe<'py, PyAny>,
T: 'a,
Helper impl for casting into args for python functions calls.
impl<'a, 'py, T> TryIntoPyObjectUnsafe<'py, PyTuple> for &'a Vec<T>where
&'a T: TryIntoPyObjectUnsafe<'py, PyAny>,
T: 'a,
Helper impl for casting into args for python functions calls.
unsafe fn try_to_object_unsafe( self, py: Python<'py>, ) -> PyResult<Bound<'py, PyTuple>>
Implementors§
impl<'a, 'py, T> TryIntoPyObjectUnsafe<'py, PyAny> for &'a PyTree<T>where
&'a T: TryIntoPyObjectUnsafe<'py, PyAny>,
T: 'a,
Serialize into a PyObject
.