bytes icon indicating copy to clipboard operation
bytes copied to clipboard

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

Open Ted-Jiang opened this issue 3 years ago • 1 comments

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 🤔?

Ted-Jiang avatar Aug 16 '22 08:08 Ted-Jiang

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

Darksonn avatar Aug 16 '22 12:08 Darksonn