pub fn cast_as<D>(&self, py: Python) -> Result<&D, <D as PyTryFrom>::Error>
        where D: PyTryFrom<Error=PyDowncastError>
    {
        D::try_from(self.as_ref(py))
    }
/// Casts the PyObject to a concrete Python object type.
Casts the PyObject to a concrete Python object type.
Casts the PyObject to a concrete Python object type .
pub fn cast_as<D>(&self, py: Python) -> Result<&D, <D as PyTryFrom>::Error>
        where D: PyTryFrom<Error=PyDowncastError>
    {
        D::try_from(self.as_ref(py))
    }
pub fn cast_as < D > ( & self , py : Python ) -> Result < & D , < D as PyTryFrom > :: Error > where D : PyTryFrom < Error = PyDowncastError > { D :: try_from ( self . as_ref ( py ) ) }
Casts the PyObject to a concrete Python object type.
Casts the PyObject to a concrete Python object type .
&self
py
Python
&self
py
Python