Registry / utility / tee
library0.1.0rscratesunverified

An adapter for readers which delegate reads to a writer.

# Cargo.toml [dependencies] tee = "0.1.0"
INSTALL
IMPORT
SIG · TEE
T
tee
utilityrustv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TeeReader
use tee::TeeReader;

Demonstrates using TeeReader to read from a source while simultaneously writing all read bytes to a writer.

use tee::TeeReader; use std::io::{Read, Write, Cursor}; let data = b"hello world"; let reader = Cursor::new(data); let mut writer = Vec::new(); let mut tee = TeeReader::new(reader, &mut writer); let mut output = String::new(); tee.read_to_string(&mut output).unwrap(); assert_eq!(output, "hello world"); assert_eq!(writer, b"hello world");
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
4
Amazon
1
Resources
tee — cargo add tee · libregistry