miniconf icon indicating copy to clipboard operation
miniconf copied to clipboard

Derive `Tree` for structs containing generic `Tree` types of generic depth

Open ryan-summers opened this issue 3 months ago • 3 comments

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.

ryan-summers avatar Mar 22 '24 13:03 ryan-summers