1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
//! Reading, writing, and manipulating bytes.
//!
//! In this module, we use the following type shorthands:
//! - R is the [`Reader`]: for dd, this is either [`Stdin`][std::io::Stdin] or a
//! [`File`][std::fs::File]
//! - W is the [`Writer`]: for dd, this is either [Stdout][std::io::Stdout]
//! or a [`File`][std::fs::File]
//! - C is the [`Converter`][conv::Converter]
//! - E is the error output. This is _always_ Stderr during normal operation
//! (the type paramater exists to facilitate testing)
/// [Converter][conv::Converter] converts a slice according to the conversion flags and
/// conversion block size specified in [`super::opts`]
pub mod conv;
/// copy bytes from a [`Reader`][read::Reader] to a [Writer][write::Writer], converting them according to a
/// [Converter][conv::Converter]
pub mod copy;
/// [`Reader`][read::Reader] reads from the specified file or stdin, according to the
/// options specified in `opts`
pub mod read;
/// [`Writer`][write::Writer] writes to the specified file or stdout, according to the
/// options specified in `opts`
pub mod write;
#[cfg(test)]
mod tests;