read_buffer 1.4.0

This crate provides ReadBuffer, a wrapper to safely read into a buffer from a Read.
Documentation
1
2
3
4
5
6
7
8
9
10
use std::io;
use std::io::{ErrorKind, Read};

pub struct ErrorReader;

impl Read for ErrorReader {
	fn read(&mut self, _buffer: &mut [u8]) -> io::Result<usize> {
		Err(ErrorKind::NotFound.into())
	}
}