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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! 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::StdinLock]
//! or a
//! [`File`][std::fs::File]
//! - W is the [`Writer`]: for dd, this is either [std::io::StdoutLock]
//! or a [`File`][std::fs::File]
//! - C is a [`ConvertSlice`], which modifies a slice of bytes in-place. During
//! operation, this is always a [`Converter`]
//! - E is the [`ErrHandler`]. During operation, this is [std::io::StderrLock].
/// copy bytes from a [`Reader`] to a [`Writer`]
/// converting them according to a [`Converter`]
/// [`Converter`] encodes a slice to the specified encoding,
/// changes the case (if applicable), and/or swaps pairs of bytes,
/// according to the conversion flags and conversion block size specified in
/// [`opts`]
pub use Converter;
/// [`ErrHandler`] handles errors, writing errors and/or perodic reports to the
/// speicifed file or stderr. see [`StatusLevel`] and
/// [`NOERROR`][CFlag]
pub use ErrHandler;
/// [`Reader`] reads from the specified file or stdin, according
/// to the options specified in `opts`
pub use Reader;
/// [`Writer`] writes to the specified file or stdout, according
/// to the options specified in `opts`
pub use Writer;
pub use ConvertSlice;
use ;