Open
Description
In some scenarios, it's desirable to compose multiple encoders or decoders—for example, encoding a struct to JSON, then compressing and encrypting it, while also prepending a length field.
To support this use case, it would be useful to enable chaining decoders via a method like decoder_a.chain_decoder(decoder_b), producing a new decoder that applies both in sequence.
I've put together a small POC here: chained_codec
If this seems like a useful addition, I’d be happy to contribute it as a tokio_util
feature. Let me know your thoughts!