-
I would like to parse a python dictionary to the following nested rust structs: #[derive(FromPyObject, Debug, Default, Clone)]
#[pyo3(from_item_all)]
pub struct Top {
pub a_vec: Vec<String>,
pub nested: Option<Nested>,
}
#[derive(FromPyObject, Debug, Clone, Default)]
#[pyo3(from_item_all)]
pub struct Nested {
pub f1: Option<bool>,
pub f2: Option<bool>,
} by using I'm currently getting this error:
Am I doing something wrong? Or nested structs are not supported? |
Beta Was this translation helpful? Give feedback.
Answered by
andronat
Aug 11, 2023
Replies: 1 comment
-
In my internal example which is much more complex, I was missing |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
andronat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my internal example which is much more complex, I was missing
#[pyo3(from_item_all)]
from all nested structs.