pub struct BytesReader<'a> { /* private fields */ }Implementations§
Source§impl<'a> BytesReader<'a>
impl<'a> BytesReader<'a>
pub fn new(buf: &'a [u8]) -> Self
pub fn remaining(&self) -> usize
pub fn read_byte(&mut self) -> Result<u8, String>
pub fn read_bytes(&mut self, len: usize) -> Result<&'a [u8], String>
Sourcepub fn read_uleb128(&mut self) -> Result<u64, String>
pub fn read_uleb128(&mut self) -> Result<u64, String>
Decode an unsigned LEB128 into u64, guarding against excessive shifts.
pub fn read_var_bytes(&mut self) -> Result<&'a [u8], String>
pub fn read_var_string(&mut self) -> Result<String, String>
Auto Trait Implementations§
impl<'a> Freeze for BytesReader<'a>
impl<'a> RefUnwindSafe for BytesReader<'a>
impl<'a> Send for BytesReader<'a>
impl<'a> Sync for BytesReader<'a>
impl<'a> Unpin for BytesReader<'a>
impl<'a> UnwindSafe for BytesReader<'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