[−][src]Trait pyo3::type_object::PyObjectAlloc
A Python object allocator that is usable as a base type for #[pyclass]
All native types and all #[pyclass] types use the default functions, while
PyObjectWithFreeList gets a special version.
Provided methods
unsafe fn alloc(_py: Python) -> *mut PyObject
unsafe fn dealloc(py: Python, obj: *mut PyObject)
Calls the rust destructor for the object and frees the memory (usually by calling ptr->ob_type->tp_free). This function is used as tp_dealloc implementation.
unsafe fn drop(py: Python, obj: *mut PyObject)
Calls the rust destructor for the object.
Implementors
impl PyObjectAlloc for PyModule[src]
impl PyObjectAlloc for PyAny[src]
impl PyObjectAlloc for PyBool[src]
impl PyObjectAlloc for PyByteArray[src]
impl PyObjectAlloc for PyBytes[src]
impl PyObjectAlloc for PyComplex[src]
impl PyObjectAlloc for PyDate[src]
impl PyObjectAlloc for PyDateTime[src]
impl PyObjectAlloc for PyDelta[src]
impl PyObjectAlloc for PyDict[src]
impl PyObjectAlloc for PyFloat[src]
impl PyObjectAlloc for PyFrozenSet[src]
impl PyObjectAlloc for PyList[src]
impl PyObjectAlloc for PyLong[src]
impl PyObjectAlloc for PySet[src]
impl PyObjectAlloc for PySlice[src]
impl PyObjectAlloc for PyString[src]
impl PyObjectAlloc for PyTime[src]
impl PyObjectAlloc for PyTuple[src]
impl PyObjectAlloc for PyType[src]
impl PyObjectAlloc for PyTzInfo[src]
impl<T> PyObjectAlloc for T where
T: PyObjectWithFreeList, [src]
T: PyObjectWithFreeList,