maturin

How to iterate over vector of pyclass objects in rust?

How to iterate over vector of pyclass objects in rust? Question: I am using maturin and I am trying to implement the method get_car() for my class. But using the following code use pyo3::prelude::*; #[pyclass] struct Car { name: String, } #[pyclass] struct Garage { cars: Vec<Car>, } #[pymethods] impl Garage { fn get_car(&self, name: …

Total answers: 1