Skip to main content

Module reader

Module reader 

Source
Expand description

Sequential bounds-checked reader over a byte buffer. Every accessor returns Result, so a decoder written against it cannot index past the end of its input no matter what lengths the input declares. Reading a fixed-width integer goes through array, which yields an owned [u8; N] and removes the try_into().unwrap() that hand-rolled cursors need.

Structsยง

ByteReader
Reader over bytes, tracking a cursor and the payload name used in errors.