-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deserialize raw bytes into Vec<u8> #249
Comments
i think, that's why serde_bytes exist.
So you're serializing the data as bytes, that is because you're using The problem you're having has nothing to do with rmp in particular, it's a generic serde problem, which can be workarounded by the mentioned serde_bytes crate. |
would it be possible to use https://doc.rust-lang.org/std/any/ i did some benchmarking, round-tripping i'm seeing about 20 mb/s to round trip the generic way and 1-2 gb/s with serde_bytes
|
Maybe I missed it, but I'm unable to deserialize a raw binary value as a
Vec<u8>
:AFAICT, it's the same issue with fixed arrays.
The only work around is to use
rmp_serde::Raw
, but that seems odd.The text was updated successfully, but these errors were encountered: