pub struct Reader<'a> {
pub buffer: &'a [u8],
pub bytes_consumed: usize,
}Fields§
§buffer: &'a [u8]§bytes_consumed: usizeImplementations§
Source§impl<'a> Reader<'a>
impl<'a> Reader<'a>
pub fn read(&mut self, length: usize) -> Result<&'a [u8], &'static str>
pub fn read_byte(&mut self) -> Result<u8, &'static str>
pub fn read_u32(&mut self) -> Result<u32, &'static str>
pub fn read_u64(&mut self) -> Result<u64, &'static str>
pub fn offset(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
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> 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