kxio/
lib.rs

1//! # kxio
2//!
3//! `kxio` is a Rust library that provides injectable `FileSystem`, `Network` and `Printer`
4//! resources to enhance the testability of your code. By abstracting system-level
5//! interactions, `kxio` enables easier mocking and testing of code that relies on
6//! file system, network and print operations.
7//!
8//! ## Features
9//!
10//! - Filesystem Abstraction
11//! - Network Abstraction
12//! - Print Abstraction
13//! - Enhanced Testability
14//!
15//! ## Filesystem
16//!
17//! The Filesystem module offers a clean abstraction over `std::fs`, the standard
18//! file system operations. For comprehensive documentation and usage examples,
19//! please refer to <https://docs.rs/kxio/latest/kxio/fs/>.
20//!
21//! ### Key Filesystem Features:
22//!
23//! - File reading and writing
24//! - Directory operations
25//! - File metadata access
26//! - Fluent API for operations like `.reader().bytes()`
27//!
28//! ## Network
29//!
30//! The Network module offers a testable interface over the `reqwest` crate. For
31//! comprehensive documentation and usage examples, please refer to
32//! <https://docs.rs/kxio/latest/kxio/net/>
33//!
34//! ## Printer
35//!
36//! No, not a hardware printer, but console output via the family of `println` macros from the
37//! Standard Library.
38//!
39//! ## Getting Started
40//!
41//! Add `kxio` to your `Cargo.toml`:
42//!
43//! ```toml
44//! [dependencies]
45//! kxio = "x.y.z"
46//! ```
47//!
48//! ## Usage
49//!
50//! See the example [get.rs](https://git.kemitix.net/kemitix/kxio/src/branch/main/examples/get.rs) for an annotated example on how to use the `kxio` library.
51//! It covers the `net`, `fs` and `print` modules.
52//!
53//! ## Development
54//!
55//! - The project uses [Cargo Mutants](https://crates.io/crates/cargo-mutants) for mutation testing.
56//! - [ForgeJo Actions](https://forgejo.org/docs/next/user/actions/) are used for continuous testing and linting.
57//!
58//! ## Contributing
59//!
60//! Contributions are welcome! Please check our [issue tracker](https://git.kemitix.net/kemitix/kxio/issues) for open tasks or
61//! submit your own ideas.
62//!
63//! ## License
64//!
65//! This project is licensed under the terms specified in the `LICENSE` file in the
66//! repository root.
67//!
68//! ---
69//!
70//! For more information, bug reports, or feature requests, please visit our [repository](https://git.kemitix.net/kemitix/kxio).
71
72pub mod fs;
73pub mod net;
74pub mod print;
75mod result;
76
77pub use result::{Error, Result};