[][src]Trait cpython::PythonObjectWithCheckedDowncast

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

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

Required methods

pub fn downcast_from<'p>(
    py: Python<'p>,
    obj: PyObject
) -> Result<Self, PythonObjectDowncastError<'p>>
[src]

Cast from PyObject to a concrete Python object type.

pub fn downcast_borrow_from<'a, 'p>(
    py: Python<'p>,
    obj: &'a PyObject
) -> Result<&'a Self, PythonObjectDowncastError<'p>>
[src]

Cast from PyObject to a concrete Python object type.

Loading content...

Implementors

impl PythonObjectWithCheckedDowncast for AssertionError[src]

impl PythonObjectWithCheckedDowncast for AttributeError[src]

impl PythonObjectWithCheckedDowncast for BaseException[src]

impl PythonObjectWithCheckedDowncast for BlockingIOError[src]

impl PythonObjectWithCheckedDowncast for BrokenPipeError[src]

impl PythonObjectWithCheckedDowncast for BufferError[src]

impl PythonObjectWithCheckedDowncast for ChildProcessError[src]

impl PythonObjectWithCheckedDowncast for ConnectionAbortedError[src]

impl PythonObjectWithCheckedDowncast for ConnectionError[src]

impl PythonObjectWithCheckedDowncast for ConnectionRefusedError[src]

impl PythonObjectWithCheckedDowncast for ConnectionResetError[src]

impl PythonObjectWithCheckedDowncast for EOFError[src]

impl PythonObjectWithCheckedDowncast for EnvironmentError[src]

impl PythonObjectWithCheckedDowncast for Exception[src]

impl PythonObjectWithCheckedDowncast for FileExistsError[src]

impl PythonObjectWithCheckedDowncast for FileNotFoundError[src]

impl PythonObjectWithCheckedDowncast for FloatingPointError[src]

impl PythonObjectWithCheckedDowncast for IOError[src]

impl PythonObjectWithCheckedDowncast for ImportError[src]

impl PythonObjectWithCheckedDowncast for IndexError[src]

impl PythonObjectWithCheckedDowncast for InterruptedError[src]

impl PythonObjectWithCheckedDowncast for IsADirectoryError[src]

impl PythonObjectWithCheckedDowncast for KeyError[src]

impl PythonObjectWithCheckedDowncast for KeyboardInterrupt[src]

impl PythonObjectWithCheckedDowncast for LookupError[src]

impl PythonObjectWithCheckedDowncast for MemoryError[src]

impl PythonObjectWithCheckedDowncast for NameError[src]

impl PythonObjectWithCheckedDowncast for NotADirectoryError[src]

impl PythonObjectWithCheckedDowncast for NotImplementedError[src]

impl PythonObjectWithCheckedDowncast for OSError[src]

impl PythonObjectWithCheckedDowncast for OverflowError[src]

impl PythonObjectWithCheckedDowncast for PermissionError[src]

impl PythonObjectWithCheckedDowncast for ProcessLookupError[src]

impl PythonObjectWithCheckedDowncast for ReferenceError[src]

impl PythonObjectWithCheckedDowncast for RuntimeError[src]

impl PythonObjectWithCheckedDowncast for SyntaxError[src]

impl PythonObjectWithCheckedDowncast for SystemError[src]

impl PythonObjectWithCheckedDowncast for SystemExit[src]

impl PythonObjectWithCheckedDowncast for TimeoutError[src]

impl PythonObjectWithCheckedDowncast for TypeError[src]

impl PythonObjectWithCheckedDowncast for UnicodeDecodeError[src]

impl PythonObjectWithCheckedDowncast for UnicodeEncodeError[src]

impl PythonObjectWithCheckedDowncast for UnicodeTranslateError[src]

impl PythonObjectWithCheckedDowncast for ValueError[src]

impl PythonObjectWithCheckedDowncast for ZeroDivisionError[src]

impl PythonObjectWithCheckedDowncast for PyBool[src]

impl PythonObjectWithCheckedDowncast for PyBytes[src]

impl PythonObjectWithCheckedDowncast for PyCapsule[src]

impl PythonObjectWithCheckedDowncast for PyDict[src]

impl PythonObjectWithCheckedDowncast for PyFloat[src]

impl PythonObjectWithCheckedDowncast for PyLong[src]

impl PythonObjectWithCheckedDowncast for PyList[src]

impl PythonObjectWithCheckedDowncast for PyModule[src]

impl PythonObjectWithCheckedDowncast for PyObject[src]

impl PythonObjectWithCheckedDowncast for PySequence[src]

impl PythonObjectWithCheckedDowncast for PySet[src]

impl PythonObjectWithCheckedDowncast for PyTuple[src]

impl PythonObjectWithCheckedDowncast for PyType[src]

impl PythonObjectWithCheckedDowncast for PyString[src]

Loading content...