miniconf
miniconf copied to clipboard
Derive `Tree` for structs containing generic `Tree` types of generic depth
Currently, it doesn't seem possible to do the following properly:
struct A<T: TreeKey<Y>, const Y: usize> {
inner: T,
outer: u32,
}
We would need to annotate the inner: T
with #[tree(depth(Y))]
, but the current depth parsing requires an integer. The depth isn't known until compile time, but is known to be Y >= 1. It seems like the depth should optionally take this compile-time generic as well.