pub struct IoRead<R>where
R: Read,{ /* private fields */ }Expand description
JSON input source that reads from a std::io input stream.
Implementations§
Source§impl<R> IoRead<R>where
R: Read,
impl<R> IoRead<R>where
R: Read,
Sourcepub fn new(reader: R) -> Self
pub fn new(reader: R) -> Self
Create a JSON input source to read from a std::io input stream.
When reading from a source against which short reads are not efficient, such
as a File, you will want to apply your own buffering because serde_json
will not buffer the input. See std::io::BufReader.