pub struct ByteCursor<'a> { /* private fields */ }Implementations§
Source§impl<'a> ByteCursor<'a>
impl<'a> ByteCursor<'a>
pub fn new(data: &'a [u8]) -> Self
pub fn with_order(data: &'a [u8], order: ByteOrder) -> Self
pub fn order(&self) -> ByteOrder
pub fn position(&self) -> usize
pub fn remaining(&self) -> usize
pub fn is_eof(&self) -> bool
pub fn skip(&mut self, n: usize) -> Result<(), CursorError>
pub fn align(&mut self, align: usize) -> Result<(), CursorError>
pub fn slice(&mut self, n: usize) -> Result<&'a [u8], CursorError>
pub fn bytes(&mut self, n: usize) -> Result<&[u8], CursorError>
pub fn u8(&mut self) -> Result<u8, CursorError>
pub fn i8(&mut self) -> Result<i8, CursorError>
pub fn u16(&mut self) -> Result<u16, CursorError>
pub fn i16(&mut self) -> Result<i16, CursorError>
pub fn u32(&mut self) -> Result<u32, CursorError>
pub fn i32(&mut self) -> Result<i32, CursorError>
pub fn u64(&mut self) -> Result<u64, CursorError>
pub fn i64(&mut self) -> Result<i64, CursorError>
pub fn f32(&mut self) -> Result<f32, CursorError>
pub fn f64(&mut self) -> Result<f64, CursorError>
pub fn try_u8(&mut self) -> Option<u8>
pub fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), CursorError>
Auto Trait Implementations§
impl<'a> Freeze for ByteCursor<'a>
impl<'a> RefUnwindSafe for ByteCursor<'a>
impl<'a> Send for ByteCursor<'a>
impl<'a> Sync for ByteCursor<'a>
impl<'a> Unpin for ByteCursor<'a>
impl<'a> UnsafeUnpin for ByteCursor<'a>
impl<'a> UnwindSafe for ByteCursor<'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