bytes
bytes copied to clipboard
[Question] Is it reasonable to have cost efficient constructor for BytesMut?
Currently, BytesMut
seems to require buffer allocation when converted from other types: https://docs.rs/bytes/latest/src/bytes/bytes_mut.rs.html#1172
Is there any reason not to provide allocation-free BytesMut
constructor like https://docs.rs/bytes/latest/src/bytes/bytes.rs.html#843? (I'd like to use Box<[u8]>
to create BytesMut
as well. )