MathiasKoch[m]: > <@mathias_koch:matrix.org> ryan-summers: > I started implementing general enum support in miniconf, but I think we might need to discuss slightly how it should work :p > > For instance, a simple unit test of the node iteration: > > ```rust > > #[derive(PartialEq, Debug, Clone, Default, Tree)] > struct Inner { > data: u32, > } > > #[derive(Debug, Clone, Default, Tree)] > struct Settings { > #[tree(depth = 1)] > value: Either, > } > > #[derive(Debug, Clone, Default, Tree)] > enum Either { > #[default] > Unit, > NamedTuple(Inner) > } > > #[test] > fn iterate_keys() { > let mut expected_keys = HashSet::from([ > // What would you expect here? > ]); > > for node in Settings::nodes::>() { > let (path, node) = node.unwrap(); > assert!(node.is_leaf()); > > assert!(expected_keys.remove(path.as_str())); > } > assert!(expected_keys.is_empty()); > } > ``` > > Should the `expected_keys` contain all possible cases (`["/value/Unit", "/value/NamedTuple/data"]`)? I would think so, with the non-constructed ones returning absent? That's kinda what I'd expect, also I guess the depth parameters makes less sense, since it only half correlates to the path depth? That's an interesting question