Commit Graph

3 Commits

Author SHA1 Message Date
Oliver Gugger
454f56d4a8
tlv: generate TLV types for custom ranges 2024-05-14 08:16:42 +02:00
Olaoluwa Osuntokun
09afc92215
tlv: make TlvType method for TlvType interface public
With this change, callers can now examine a struct instance of the
`TlvType` instance to figure out programmatically which integer type is
maps to. This'll be useful when decoding optional TLV types into a wire
struct (knowing when to set it to Some vs None).
2024-01-02 18:51:33 -08:00
Olaoluwa Osuntokun
78d5806555
tlv/internal: add new internal package for generating TLV type structs
In this commit, we add some new code generation to the codebase. As
we'll see in a future commit, this'll allow us to create a new Record[T,
V] type, where T is actually a concrete _struct_ that implements a
special interface that deems it as a valid TLV type.
2023-12-12 17:47:01 -08:00