pub struct IoReader<R> { /* private fields */ }Available on crate feature
std only.Expand description
A reader that reads from a std::io::Read.
Implementations§
Trait Implementations§
Source§impl<R> Reader for IoReader<R>where
R: Read,
impl<R> Reader for IoReader<R>where
R: Read,
Source§fn read(&mut self, bytes: &mut [u8]) -> Result<(), DecodeError>
fn read(&mut self, bytes: &mut [u8]) -> Result<(), DecodeError>
Fill the given
bytes argument with values. Exactly the length of the given slice must be filled, or else an error must be returned. Read moreSource§fn read_u8(&mut self) -> Result<u8, DecodeError>
fn read_u8(&mut self) -> Result<u8, DecodeError>
Read a single byte from the reader. Read more
Source§fn peek_read(&mut self, _: usize) -> Option<&[u8]>
fn peek_read(&mut self, _: usize) -> Option<&[u8]>
If this reader wraps a buffer of any kind, this function lets callers access contents of
the buffer without passing data through a buffer first.
Auto Trait Implementations§
impl<R> Freeze for IoReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for IoReader<R>where
R: RefUnwindSafe,
impl<R> Send for IoReader<R>where
R: Send,
impl<R> Sync for IoReader<R>where
R: Sync,
impl<R> Unpin for IoReader<R>where
R: Unpin,
impl<R> UnsafeUnpin for IoReader<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for IoReader<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