pub struct Reader<R: Read>(pub R);Tuple Fields§
§0: RTrait Implementations§
Source§impl<R: Read> Decoder for Reader<R>
impl<R: Read> Decoder for Reader<R>
Source§fn decode_byte(&mut self) -> Result<u8, DecodeError>
fn decode_byte(&mut self) -> Result<u8, DecodeError>
Decodes a single byte from the reader.
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), DecodeError>
Source§fn decode_ranged<T: Decode + PartialOrd>(
&mut self,
range: impl RangeBounds<T>,
) -> Result<T, DecodeError>
fn decode_ranged<T: Decode + PartialOrd>( &mut self, range: impl RangeBounds<T>, ) -> Result<T, DecodeError>
Decodes a value and ensures it falls within the supplied range.
Source§fn assert_magic(&mut self) -> Result<(), DecodeError>
fn assert_magic(&mut self) -> Result<(), DecodeError>
Verifies that the next bytes in the stream match the magic sequence.
Source§fn decode<T: Decode>(&mut self) -> Result<T, DecodeError>
fn decode<T: Decode>(&mut self) -> Result<T, DecodeError>
Decodes a value implementing the
Decode trait.Source§fn decode_trailing<T: Decode>(&mut self) -> Result<Option<T>, DecodeError>
fn decode_trailing<T: Decode>(&mut self) -> Result<Option<T>, DecodeError>
Auto Trait Implementations§
impl<R> Freeze for Reader<R>where
R: Freeze,
impl<R> RefUnwindSafe for Reader<R>where
R: RefUnwindSafe,
impl<R> Send for Reader<R>where
R: Send,
impl<R> Sync for Reader<R>where
R: Sync,
impl<R> Unpin for Reader<R>where
R: Unpin,
impl<R> UnsafeUnpin for Reader<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for Reader<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