pub fn read_reader(
reader: impl Read,
max_bytes: usize,
) -> Result<Vec<u8>, ArtifactError>Expand description
Read one stream into bounded, fallibly allocated storage.
Observes at most max_bytes + 1 bytes to detect overflow. A blocking reader’s
deadline remains caller-owned. Only interrupted reads are retried.
§Errors
Returns read, allocation, or byte-limit failures. An impossible reader byte
count returns IO io::ErrorKind::InvalidData.