This would also be very useful for wire protocol formats - and relatedly LSB/MSB could also be useful (though probably lower layers of protocol stacks would take care of that concern)
`repr` is too small to contain the largest discriminant.
`repr` is too small to contain the largest discriminant.
even though u8, let alone u16, should fit for both in-memory and serde serialisation.
The benefit of this is that other code which isn't operating off of the set - e.g. something detecting end of file could directly use the discriminant:
This would also be very useful for wire protocol formats - and relatedly LSB/MSB could also be useful (though probably lower layers of protocol stacks would take care of that concern)
It would be nice to be able to do something like
etc.
Right now, such a definition will error with
even though u8, let alone u16, should fit for both in-memory and serde serialisation.
The benefit of this is that other code which isn't operating off of the set - e.g. something detecting end of file could directly use the discriminant:
rather than today: