[][src]Trait pyo3::type_object::PyLayout

pub unsafe trait PyLayout<T: PyTypeInfo> {
    const IS_NATIVE_TYPE: bool;
    fn get_super(&mut self) -> Option<&mut T::BaseLayout> { ... }
unsafe fn py_init(&mut self, _value: T) { ... }
unsafe fn py_drop(&mut self, _py: Python<'_>) { ... } }

T: PyLayout<U> represents that T is a concrete representaion of U in Python heap. E.g., PyCell is a concrete representaion of all pyclasses, and ffi::PyObject is of PyAny.

This trait is intended to be used internally.

Associated Constants

const IS_NATIVE_TYPE: bool

Loading content...

Provided methods

fn get_super(&mut self) -> Option<&mut T::BaseLayout>

unsafe fn py_init(&mut self, _value: T)

unsafe fn py_drop(&mut self, _py: Python<'_>)

Loading content...

Implementors

impl PyLayout<PyModule> for PyObject[src]

impl PyLayout<PyAny> for PyObject[src]

impl PyLayout<PyBool> for PyObject[src]

impl PyLayout<PyByteArray> for PyObject[src]

impl PyLayout<PyBytes> for PyObject[src]

impl PyLayout<PyComplex> for PyComplexObject[src]

impl PyLayout<PyDate> for PyDateTime_Date[src]

impl PyLayout<PyDateTime> for PyDateTime_DateTime[src]

impl PyLayout<PyDelta> for PyDateTime_Delta[src]

impl PyLayout<PyDict> for PyDictObject[src]

impl PyLayout<PyFloat> for PyFloatObject[src]

impl PyLayout<PyFrozenSet> for PySetObject[src]

impl PyLayout<PyList> for PyObject[src]

impl PyLayout<PyLong> for PyObject[src]

impl PyLayout<PySet> for PySetObject[src]

impl PyLayout<PySlice> for PySliceObject[src]

impl PyLayout<PyString> for PyObject[src]

impl PyLayout<PyTime> for PyDateTime_Time[src]

impl PyLayout<PyTuple> for PyObject[src]

impl PyLayout<PyType> for PyObject[src]

impl PyLayout<PyTzInfo> for PyObject[src]

impl<T: PyClass> PyLayout<T> for PyCell<T>[src]

Loading content...