pub trait PythonObjectWithCheckedDowncast: PythonObject {
    fn downcast_from(
        py: Python<'_>,
        obj: PyObject
    ) -> Result<Self, PythonObjectDowncastError<'_>>; fn downcast_borrow_from<'a, 'p>(
        py: Python<'p>,
        obj: &'a PyObject
    ) -> Result<&'a Self, PythonObjectDowncastError<'p>>; }
Expand description

Trait implemented by Python object types that allow a checked downcast.

Required Methods

Cast from PyObject to a concrete Python object type.

Cast from PyObject to a concrete Python object type.

Implementors