You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would really like to be able to concatenate relative OIDs onto base OIDs at compile-time. I'm not sure if this is actually possible, but I want to be able to write something like
Or some alternative syntax that achieves the same thing. I don't know if there's any way to achieve this without heap allocation. I really wish Rust had built-in syntax for "please flatten this array into the enclosing array literal".
The goal here is of course to be able to represent a tree of OIDs using a similar structure to how they're declared in ASN.1, instead of having to repeat the OID base everywhere.
The text was updated successfully, but these errors were encountered:
After looking into proc macros some more, I'm pretty sure this isn't possible.
What should be possible though is writing an oid_tree!() macro that lets you define a whole set of OIDs, where base OIDs can have children that are prefixed by the base. I'm currently working on such a macro for my own project, but I'd love to see this crate offer it directly.
I would love to see that at build time, but I don't think there is a way to resolve a symbol value in a proc-macro (or macro). Maybe #45 is a solution (see the PR for discussion).
I would really like to be able to concatenate relative OIDs onto base OIDs at compile-time. I'm not sure if this is actually possible, but I want to be able to write something like
Or some alternative syntax that achieves the same thing. I don't know if there's any way to achieve this without heap allocation. I really wish Rust had built-in syntax for "please flatten this array into the enclosing array literal".
The goal here is of course to be able to represent a tree of OIDs using a similar structure to how they're declared in ASN.1, instead of having to repeat the OID base everywhere.
The text was updated successfully, but these errors were encountered: