pub struct Reader<'a> { /* private fields */ }Expand description
Binary reader for decoding data
Implementations§
Source§impl<'a> Reader<'a>
impl<'a> Reader<'a>
Sourcepub fn has_remaining(&self) -> bool
pub fn has_remaining(&self) -> bool
Check if there are more bytes to read
Sourcepub fn consume_byte(&mut self) -> Result<u8>
pub fn consume_byte(&mut self) -> Result<u8>
Consume a single byte
Sourcepub fn remaining_slice(&self) -> &[u8] ⓘ
pub fn remaining_slice(&self) -> &[u8] ⓘ
Get a slice of the remaining data
Sourcepub fn consume_remaining(&mut self) -> Vec<u8> ⓘ
pub fn consume_remaining(&mut self) -> Vec<u8> ⓘ
Consume all remaining bytes
Auto Trait Implementations§
impl<'a> Freeze for Reader<'a>
impl<'a> RefUnwindSafe for Reader<'a>
impl<'a> Send for Reader<'a>
impl<'a> Sync for Reader<'a>
impl<'a> Unpin for Reader<'a>
impl<'a> UnsafeUnpin for Reader<'a>
impl<'a> UnwindSafe for Reader<'a>
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