Paul Campbell
5e0e7c2d71
- adds tokio::sync as a dependency to provide an async Mutex for Clone of Net and MockNet ## ƒs - adds `Clone` to `DirItem` - adds `Default`, `PartialEq` and `Eq` to `FileSystem`, `PathMarker`, `FileMarker` and `DirMarker` - adds `Default` to `PathReal` - adds `Clone`, `Debug`, `Default`, `PartialEq` and `Eq` to `Reader` ## net - `MockNet::try_from` now returns a `Future`, so should be `await`ed - adds `Debug` to `Plan` - adds `Debug` and `Default` to `Net` - adds `Debug`, `Clone` and `Default` to `MockNet` - adds `Debug`, `Clone`, `PartialEq` and `Eq` to `MatchRequest` - adds `Debug` and `Clone` to `WhenRequest` |
||
---|---|---|
.cargo | ||
.forgejo/workflows | ||
.git-hooks | ||
examples | ||
src | ||
tests | ||
.git-next.toml | ||
.gitignore | ||
.rgignore | ||
bacon.toml | ||
Cargo.toml | ||
CHANGELOG.md | ||
justfile | ||
LICENSE | ||
README.md | ||
renovate.json |
kxio
kxio
is a Rust library that provides injectable FileSystem
and Network
resources to enhance the testability of your code. By abstracting system-level
interactions, kxio
enables easier mocking and testing of code that relies on
file system and network operations.
Features
- Filesystem Abstraction
- Network Abstraction
- Enhanced Testability
Filesystem
The Filesystem module offers a clean abstraction over std::fs
, the standard
file system operations. For comprehensive documentation and usage examples,
please refer to https://docs.rs/kxio/latest/kxio/fs/.
Key Filesystem Features:
- File reading and writing
- Directory operations
- File metadata access
- Fluent API for operations like
.reader().bytes()
Network
The Network module offers a testable interface over the reqwest
crate. For
comprehensive documentation and usage examples, please refer to
https://docs.rs/kxio/latest/kxio/net/
Getting Started
Add kxio
to your Cargo.toml
:
[dependencies]
kxio = "x.y.z"
Usage
See the example get.rs for an annotated example on how to use the kxio
library.
It covers both the net
and fs
modules.
Development
- The project uses Cargo Mutants for mutation testing.
- ForgeJo Actions are used for continuous testing and linting.
Contributing
Contributions are welcome! Please check our issue tracker for open tasks or submit your own ideas.
License
This project is licensed under the terms specified in the LICENSE
file in the
repository root.
Acknowledgements
- Built with Rust
For more information, bug reports, or feature requests, please visit our repository.