#How can I read in a union with std.Io.Reader
1 messages · Page 1 of 1 (latest)
You'd need to know which arm the union you want to read, and at that point it's a different type.
perhaps you know this already, but just in case:
I would like to point out that these functions are reading/writing the raw memory directly, there is not format and its not human readable.
You'd need to either ensure your types are extern or packed as they have a defined layout or ensure that both ends, reading/writing, are done in the same compiled program.