Skip to main content

qubit_io/
lib.rs

1// =============================================================================
2//    Copyright (c) 2026 Haixing Hu.
3//
4//    SPDX-License-Identifier: Apache-2.0
5//
6//    Licensed under the Apache License, Version 2.0.
7// =============================================================================
8
9//! # Qubit IO
10//!
11//! Small I/O trait utilities for Rust.
12//!
13//! This crate provides named, object-safe composition traits for common
14//! [`std::io`] capability combinations and small extension traits for recurring
15//! standard-library I/O patterns. The concrete trait definitions live in
16//! dedicated modules and are re-exported from the crate root for ergonomic use.
17
18mod ext;
19pub mod prelude;
20mod traits;
21mod util;
22mod wrappers;
23
24pub use ext::{
25    BufReadExt,
26    ReadExt,
27    ReadSeekExt,
28    SeekExt,
29    WriteExt,
30    WriteSeekExt,
31};
32pub use traits::{
33    BufReadSeek,
34    ReadSeek,
35    ReadWrite,
36    ReadWriteSeek,
37    WriteSeek,
38};
39pub use util::Streams;
40pub use wrappers::{
41    ChecksumReader,
42    ChecksumWriter,
43    CountingReader,
44    CountingWriter,
45    LimitReader,
46    LimitWriter,
47    PositionGuard,
48    TeeReader,
49    TeeWriter,
50};