[−][src]Trait pyo3::pyclass::PyClassAlloc
This trait enables custom tp_new
/tp_dealloc
implementations for T: PyClass
.
Provided methods
pub unsafe fn new(
py: Python<'_>,
subtype: *mut PyTypeObject
) -> *mut Self::Layout
[src]
py: Python<'_>,
subtype: *mut PyTypeObject
) -> *mut Self::Layout
Allocate the actual field for #[pyclass]
.
Safety
This function must return a valid pointer to the Python heap.
pub unsafe fn dealloc(py: Python<'_>, self_: *mut Self::Layout)
[src]
Implementors
impl<T> PyClassAlloc for T where
T: PyTypeInfo + PyClassWithFreeList,
[src]
T: PyTypeInfo + PyClassWithFreeList,