liner icon indicating copy to clipboard operation
liner copied to clipboard

Bytes Iterator for Buffer

Open mmstick opened this issue 8 years ago • 2 comments

If you wouldn't mind, I'd like to see a bytes() iterator for the Buffer structure. Perhaps even a to_string() and as_bytes() method too. Basically, when writing data to an output, it needs to be in a raw &[u8] format.

mmstick avatar Mar 06 '17 14:03 mmstick

I'll probably implement this tomorrow if no-one else gets there first.

MovingtoMars avatar Mar 09 '17 22:03 MovingtoMars

57ea1d012d6b95f4a4506e9783a6df24d04fc1d3 should do most of what you're looking for.

(Buffer already has to_string() as it implements std::fmt::Display)

MovingtoMars avatar May 30 '17 11:05 MovingtoMars