Module io

Source
Expand description

Easily write primitives and slices of primitives to binary std::io::Write streams and easily read from binary std::io::Read streams.

Also contains the unsafe bytes module for reinterpreting values as byte slices and vice versa.

Modules§

bytes
Reinterpret values as byte slices and byte slices as values unsafely.

Macros§

implement_simple_primitive_write 🔒
implement_slice_io 🔒

Traits§

ReadEndian
A std::io::Read input stream which supports reading any primitive values from bytes. Will decode the values from either little endian or big endian, as desired.
ReadPrimitive
Offers a prettier versions of reading a primitive number.
WriteEndian
A std::io::Write output stream which supports writing any primitive values as bytes. Will encode the values to be either little endian or big endian, as desired.