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
.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for IoRead<R>where
R: Freeze,
impl<R> RefUnwindSafe for IoRead<R>where
R: RefUnwindSafe,
impl<R> Send for IoRead<R>where
R: Send,
impl<R> Sync for IoRead<R>where
R: Sync,
impl<R> Unpin for IoRead<R>where
R: Unpin,
impl<R> UnwindSafe for IoRead<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more