python-bindings

Embedded a #[pyclass] in another #[pyclass]

Embedded a #[pyclass] in another #[pyclass] Question: I am trying to implement a cache for the private variable of any python class. Let’s suppose I have this: #[pyclass] struct ClassA { pv: Py<PyAny>, // GIL independent type, storable in another #[pyclass] field_a: Py<PyAny>, } #[pyclass] struct ClassB { class_a: Py<ClassA>, field_b: Py<PyAny>, } In the …

Total answers: 1