pyo3::py_result_ext

Trait PyResultExt

Source
pub(crate) trait PyResultExt<'py>: Sealed {
    // Required methods
    fn downcast_into<T: PyTypeCheck>(self) -> PyResult<Bound<'py, T>>;
    unsafe fn downcast_into_unchecked<T>(self) -> PyResult<Bound<'py, T>>;
}

Required Methods§

Source

fn downcast_into<T: PyTypeCheck>(self) -> PyResult<Bound<'py, T>>

Source

unsafe fn downcast_into_unchecked<T>(self) -> PyResult<Bound<'py, T>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'py> PyResultExt<'py> for PyResult<Bound<'py, PyAny>>

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here