[][src]Trait pyo3::type_object::PyBorrowFlagLayout

pub unsafe trait PyBorrowFlagLayout<T: PyTypeInfo>: PyLayout<T> + Sized { }

Marker type indicates that Self can be a base layout of PyClass.

Safety

Self should be laid out as follows:

This example is not tested
#[repr(C)]
struct Self {
    obj: ffi::PyObject,
    borrow_flag: u64,
    ...
}

Otherwise, implementing this trait is undefined behavior.

Implementors

Loading content...