https://github.com/softprops/tee
tee for rustlang readers
https://github.com/softprops/tee
Last synced: 12 months ago
JSON representation
tee for rustlang readers
- Host: GitHub
- URL: https://github.com/softprops/tee
- Owner: softprops
- License: mit
- Created: 2015-12-12T14:57:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-08-16T06:16:16.000Z (almost 4 years ago)
- Last Synced: 2025-03-17T12:00:03.498Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 522 KB
- Stars: 8
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tee
[](https://travis-ci.org/softprops/tee) [](https://coveralls.io/github/softprops/tee?branch=master)
A rustlang adapter for readers which delegate read bytes to a writer, adapted from the standard library's `std::io::Read#tee` which has since been deprecated.
## install
Add the following to your `Cargo.toml` file
```toml
[dependencies]
tee = "0.1"
```
## api docs
rustdoc api documentation can be found [here](https://softprops.github.io/tee)
## examples
The currently unstable/deprecated std library function looks like this
```rust
let tee_reader = reader.tee(writer);
```
With `tee`, this looks more like
```rust
let tee_reader = tee::TeeReader::new(reader, writer);
```
Doug Tangren (softprops) 2015