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
In my project I extensively use various byte arrays (Vec<u8>, [u8]). I have quite a number of types which comprise those as fields.
My problem is, ruslter converts those to Erlang lists, and I don't like for obvious reasons. This leaves me to these workarounds:
Implement almost all decoders/encoders by hand
Wrap all byte arrays with a newtype
Cry
The problem with 1 is that it's quite a tedious work. It also adds maintenance burden. Normally I would use a derive macro, but it automatically picks lists. I know the current way to go is 2, but I don't want to pollute entire code with a custom wrapper for a byte array for this one sole purpose. My project is not Erlang-first oriented. Regarding 3, I am out of tears already.
Is there any better way around it? If not, could this be a feature request?
The text was updated successfully, but these errors were encountered:
In my project I extensively use various byte arrays (
Vec<u8>
,[u8]
). I have quite a number of types which comprise those as fields.My problem is,
ruslter
converts those to Erlang lists, and I don't like for obvious reasons. This leaves me to these workarounds:The problem with 1 is that it's quite a tedious work. It also adds maintenance burden. Normally I would use a derive macro, but it automatically picks lists. I know the current way to go is 2, but I don't want to pollute entire code with a custom wrapper for a byte array for this one sole purpose. My project is not Erlang-first oriented. Regarding 3, I am out of tears already.
Is there any better way around it? If not, could this be a feature request?
The text was updated successfully, but these errors were encountered: