bytes icon indicating copy to clipboard operation
bytes copied to clipboard

`Buf::try_advance` support

Open Tom01098 opened this issue 7 months ago • 0 comments

Buf::advance is a required method and panics if it runs out of bytes. It would be useful to have a similar functionality which doesn't panic, returning a TryGetError.

Buf::try_advance could be the required method instead of Buf::advance, with the latter being a wrapper on top of the former which just unwraps and panics. This may be undesirable as it would break all implementations!

Tom01098 avatar May 24 '25 20:05 Tom01098