`read_le` and `read_be` exist but `write_le` and `write_be` don't

Hey, i just found read_le and its be counterpart but can't find write_le and write_be in the Write trait. I think that they should be added, because they would be very convenient.

1 Like

Probably good to implement for consistency, but doing it with write plus to_xe_bytes is straightforward, whereas reading is more annoying and more in need of a shortcut.

Technically needs to be write_all I think.

3 Likes

Depends on what you're writing to, I've seen cases where the only correct option is to call write and report an error if it doesn't do the entire length in one operation

1 Like