Crate urex_binary_io

source ·
Expand description

A crate that implements endianed BinaryReaders for use in urex.

This crate provides the BinaryRead and BinaryWrite traits and three implementations of them each.

The BinaryRead and BinaryWrite traits aren’t implemented for std::io::Read and std::io::Write respectively, because they are not endian aware. Instead, they are implemented for the three endian aware structs that either set the endianness or make it variable.

The implementations are namely:

The VE stands for variable endian, the LE stands for little-endian, and the BE stands for big-endian.

The BinaryReaderVE and BinaryWriterVE structs are flexible, allowing you to set and change the endianness at runtime. The endianness can be set by setting the endian field, which is of type Endian.
The BinaryReaderLE and BinaryWriterLE structs are restrictive, as they only allow you to read/write little-endian data.
The BinaryReaderBE and BinaryWriterBE structs are restrictive, as they only allow you to read/write big-endian data.

Structs

Enums

Traits