Repository navigation
|
We had introduced a I wanted to express this requirement by specifying a I've gone with EDIT: I think this question applies to all "abstract" |
Replies: 1 comment
|
Ideally we'd use We cannot parametrize types with values, so we're restricted to using handle types with associated tags instead. We could define more generic handles for each available tag, and |
Ideally we'd use
OpTags as root node restrictions, but notice that tags are enum values whileNodeHandles are types implementing a trait.We cannot parametrize types with values, so we're restricted to using handle types with associated tags instead.
(Rust supports const generics like
Array<const N: usize>, but it doesn't allow arbitrary enums likeOpTag).We could define more generic handles for each available tag, and
NodeHandle::try_castwhere necessary. I just worry that the explicit calls may get annoying.