Comment by Arnavion

Comment by Arnavion 3 days ago

0 replies

The bytes crate does support what ComputerGuru asked for via the Buf trait. The trait can be implemented over a sequence of buffers but still provides functions that are common with single buffers. For example the hyper crate uses the trait in exactly this way - it has an internal type that is a VecDeque of chunks but also implements the Buf trait.

https://docs.rs/bytes/1.9.0/bytes/buf/trait.Buf.html

https://github.com/hyperium/hyper/blob/3817a79b213f840302d7e...