Encode_to_vec bincode

What does it do when given standard config? Is it like bytemuck::cast_slice at all?

It isn't like cast_slice at all, what it does it depends on the config and for a standard config, it is little endian with a variable width encoding.

So even with legacy it doesn't do anything like cast_slice?

Nope, legacy is just little endian but fixed width if I recall, so encode is actually encoding.

It's never casting. It always encodes a copy. The encoding may be simple, but it's not a cast.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.