Trait cpython::py_class::BaseObject
source · [−]pub trait BaseObject: PythonObject {
type InitType;
fn size() -> usize;
unsafe fn alloc(
py: Python<'_>,
ty: &PyType,
init_val: Self::InitType
) -> PyResult<PyObject>;
unsafe fn dealloc(py: Python<'_>, obj: *mut PyObject);
}Expand description
A PythonObject that is usable as a base type with the py_class!() macro.