How to parse enum where the discriminant is not the first field? #546
Unanswered
pastelmind
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How do I parse a data structure whose 'discriminant' comes after the data? e.g.
I guess this requires deku to defer parsing the first byte while it examines the second byte, then go "backwards" to parse the first byte.
Is this doable with derive macros and attributes? Or do I have to implement
DekuReaderandDekuWritermanually?P. S. deku is an excellent library! Thanks to everyone who worked on it.
Beta Was this translation helpful? Give feedback.
All reactions