Trait cpython::PythonObject [] [src]

pub trait PythonObject: ToPyObject + Send + Sized + 'static {
    fn as_object(&self) -> &PyObject;
fn into_object(self) -> PyObject;
unsafe fn unchecked_downcast_from(_: PyObject) -> Self;
unsafe fn unchecked_downcast_borrow_from(_: &PyObject) -> &Self; }

Trait implemented by all Python object types.

Required Methods

Casts the Python object to PyObject.

Casts the Python object to PyObject.

Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.

Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.

Implementors