Module rubbl_core::io

source ·
Expand description

Basic I/O helpers.

Structs

This struct wraps a Read type to equip it with hooks to track its alignment — that is, how many bytes into the stream the read has progressed, and whether the current offset is an exact multiple of a certain number of bytes from the beginning.
In analogoy with AligningReader, this struct wraps a Write type to equip it with hooks to track its alignment — that is, how many bytes into the stream the write has progressed, and whether the current offset is an exact multiple of a certain number of bytes from the beginning.

Traits

Extend the Read trait to provide functions for reading an exact number of bytes from a stream and distinguishing whether EOF was encountered immediately, versus whether it was encountered in the midst of the read.
This is an extension trait that makes it more convenient to handle errors when opening files that may be missing.