(&self, py: Python)
| 34 | T: Owned2PyObject + Clone + Default, |
| 35 | { |
| 36 | fn to_list(&self, py: Python) -> PyResult<PyObject> { |
| 37 | use pyo3::types::PyList; |
| 38 | let objects: PyResult<Vec<_>> = self |
| 39 | .storage |
| 40 | .values() |
| 41 | .cloned() |
| 42 | .map(|x| x.into_object(py)) |
| 43 | .collect(); |
| 44 | Ok(PyList::new(py, objects?).to_object(py)) |
| 45 | } |
| 46 | |
| 47 | fn to_object(&self, py: Python) -> PyResult<PyObject> { |
| 48 | self.storage |
no test coverage detected