pub struct Reader<'a> { /* private fields */ }Implementations§
Source§impl<'a> Reader<'a>
impl<'a> Reader<'a>
pub fn new(bytes: &'a [u8]) -> Self
pub fn position(&self) -> usize
pub fn remaining(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn take(&mut self, n: usize) -> Result<&'a [u8], DecodeError>
pub fn u8(&mut self) -> Result<u8, DecodeError>
pub fn u16(&mut self) -> Result<u16, DecodeError>
pub fn u32(&mut self) -> Result<u32, DecodeError>
pub fn u64(&mut self) -> Result<u64, DecodeError>
pub fn u128(&mut self) -> Result<u128, DecodeError>
pub fn i8(&mut self) -> Result<i8, DecodeError>
pub fn i16(&mut self) -> Result<i16, DecodeError>
pub fn i32(&mut self) -> Result<i32, DecodeError>
pub fn i64(&mut self) -> Result<i64, DecodeError>
pub fn i128(&mut self) -> Result<i128, DecodeError>
pub fn f32(&mut self) -> Result<f32, DecodeError>
pub fn f64(&mut self) -> Result<f64, DecodeError>
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