tokio-rs / bytes

Utilities for working with bytes
MIT License
1.87k stars 278 forks source link

[Question] why bytes not support std::io::seek trait #566

Open Ted-Jiang opened 2 years ago

Ted-Jiang commented 2 years ago

I want to skip some bytes when reading. But i found the 'Bytes' not 'std::io::seek' is there any peculiar reason? Or any other method 🤔?

Darksonn commented 2 years ago

A Bytes doesn't support seeking backwards, so it can't implement the trait.