Trait pyo3::PyTryInto[][src]

pub trait PyTryInto<T>: Sized {
    type Error;
    fn try_into(&self) -> Result<&T, Self::Error>;
fn try_into_exact(&self) -> Result<&T, Self::Error>;
fn try_into_mut(&self) -> Result<&mut T, Self::Error>;
fn try_into_mut_exact(&self) -> Result<&mut T, Self::Error>; }

Trait implemented by Python object types that allow a checked downcast. This trait is similar to std::convert::TryInto

Associated Types

The type returned in the event of a conversion error.

Required Methods

Cast from PyObject to a concrete Python object type.

Cast from PyObject to a concrete Python object type. With exact type check.

Cast from PyObject to a concrete Python object type.

Cast from PyObject to a concrete Python object type. With exact type check.

Implementors