use std::io::{Error, ErrorKind}; mod io; mod impls; #[cfg(test)] mod tests; #[cfg(feature = "derive")] pub use orio_derive::*; pub use crate::io::*; pub(crate) use byteorder::LittleEndian as LE; /// Helper for enum [Io::read] implementations to use. #[cfg(feature = "derive")] pub fn derive_enum_variant_error(variant: usize, ident: &str) -> Error { Error::new(ErrorKind::Other, format!("Invalid enum variant {variant} for {ident}")) }