Registry / testing / partial-io

partial-io

JSON →
library0.5.4rscratesunverified

Helpers to test partial, interrupted and would-block I/O operations with support for property-based testing.

# Cargo.toml [dependencies] partial-io = "0.5.4"
INSTALL
IMPORT
SIG · PARTIAL-IO
P
partial-io
testingrustv0.5.4
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.

PartialRead
use partial_io::PartialRead;

Tests partial reads with an interrupted error.

use partial_io::PartialRead; use std::io::Read; let data = b"hello world"; let mut reader = PartialRead::new(&data[..], vec![Ok(5), Err(std::io::ErrorKind::Interrupted.into()), Ok(6)]); let mut buf = String::new(); reader.read_to_string(&mut buf).unwrap(); assert_eq!(buf, "hello world");
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
partial-io — cargo add partial-io · libregistry