LengthDelimitedCodec should support [u8] #6895
Labels
A-tokio-util
Area: The tokio-util crate
C-feature-request
Category: A feature request.
M-codec
Module: tokio-util/codec
Is your feature request related to a problem? Please describe.
LengthDelimitedCodec provides a default implementation of
Encode
forbytes::Bytes
. This forces users to importbytes
, when there is no reason not to provideEncode
for[u8]
Furthermore, LengthDelimitedCodec makes it difficult to write your own
Encode
implementation as the length handling is manual, so using the default implementation should probably be strongly recommended.Additional context
Would be willing to write a PR for this if the feature seems useful.
The text was updated successfully, but these errors were encountered: