qubit_io/lib.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! # Qubit IO
11//!
12//! Small I/O trait utilities for Rust.
13//!
14//! This crate provides named, object-safe composition traits for common
15//! [`std::io`] capability combinations and small extension traits for recurring
16//! standard-library I/O patterns. The concrete trait definitions live in
17//! dedicated modules and are re-exported from the crate root for ergonomic use.
18
19mod codecs;
20mod ext;
21pub mod prelude;
22mod traits;
23mod util;
24mod wrappers;
25
26pub use codecs::{
27 BinaryReader,
28 BinaryWriter,
29 Leb128Reader,
30 Leb128Writer,
31 ZigZagReader,
32 ZigZagWriter,
33};
34pub use ext::{
35 BinaryReadExt,
36 BinaryWriteExt,
37 BufReadExt,
38 ByteOrder,
39 Leb128ReadExt,
40 Leb128WriteExt,
41 ReadExt,
42 ReadSeekExt,
43 SeekExt,
44 StringReadExt,
45 StringWriteExt,
46 WriteSeekExt,
47 ZigZagReadExt,
48 ZigZagWriteExt,
49};
50pub use traits::{
51 BufReadSeek,
52 ReadSeek,
53 ReadWrite,
54 ReadWriteSeek,
55 WriteSeek,
56};
57pub use util::Streams;
58pub use wrappers::{
59 ChecksumReader,
60 ChecksumWriter,
61 CountingReader,
62 CountingWriter,
63 LimitReader,
64 LimitWriter,
65 PositionGuard,
66 TeeReader,
67 TeeWriter,
68};