use std::io::Cursor; use exact_reader::{ExactReader, File}; fn into_file(value: Cursor>) -> File>> { let len = value.get_ref().len(); File { file: value, size: len, filename: "cursor".to_string(), } } fn main() { let cursor: Cursor> = Cursor::new((0u8..255).collect()); let mut reader = ExactReader::new_single(into_file(cursor)); reader.reserve(26); // read later }