pub struct StdReader<R>(pub R);Expand description
Adapter that implements PbRead for all implementers of std::io::BufRead, allowing the
decoder to read from std readers.
Tuple Fields§
§0: RTrait Implementations§
Source§impl<R: BufRead> PbRead for StdReader<R>
Available on crate feature std only.
impl<R: BufRead> PbRead for StdReader<R>
Available on crate feature
std only.Source§fn pb_read_chunk(&mut self) -> Result<&[u8], Self::Error>
fn pb_read_chunk(&mut self) -> Result<&[u8], Self::Error>
Returns the internal buffer, filling it with more data if necessary. Read more
Source§fn pb_advance(&mut self, bytes: usize)
fn pb_advance(&mut self, bytes: usize)
Consumes
bytes from the underlying buffer. Read moreSource§fn pb_read_exact(
&mut self,
buf: &mut [MaybeUninit<u8>],
) -> Result<usize, Self::Error>
fn pb_read_exact( &mut self, buf: &mut [MaybeUninit<u8>], ) -> Result<usize, Self::Error>
Try to read exactly the number of bytes needed to fill
buf. Read moreAuto Trait Implementations§
impl<R> Freeze for StdReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for StdReader<R>where
R: RefUnwindSafe,
impl<R> Send for StdReader<R>where
R: Send,
impl<R> Sync for StdReader<R>where
R: Sync,
impl<R> Unpin for StdReader<R>where
R: Unpin,
impl<R> UnwindSafe for StdReader<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