pub struct BinaryReader<'a> { /* private fields */ }Implementations§
Source§impl<'a> BinaryReader<'a>
impl<'a> BinaryReader<'a>
pub fn new(buffer: &'a [u8]) -> Self
Sourcepub unsafe fn from_ptr(ptr: *const u8, size: usize) -> Self
pub unsafe fn from_ptr(ptr: *const u8, size: usize) -> Self
§Safety
The caller must ensure that ptr points to a valid block of memory
of at least size bytes, and that the memory remains valid for the
lifetime 'a.
pub fn from_variable_sized<T>(header: &'a T) -> Selfwhere
T: VariableSized,
pub fn from_payload_of_struct<T>(header: &'a T) -> Selfwhere
T: VariableSized,
pub fn read_fixed_length<T>(&mut self) -> Option<&'a T>
pub fn read<T>(&mut self) -> Option<&'a T>
pub fn skip_bytes(&mut self, bytes: usize) -> bool
pub fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for BinaryReader<'a>
impl<'a> RefUnwindSafe for BinaryReader<'a>
impl<'a> Send for BinaryReader<'a>
impl<'a> Sync for BinaryReader<'a>
impl<'a> Unpin for BinaryReader<'a>
impl<'a> UnsafeUnpin for BinaryReader<'a>
impl<'a> UnwindSafe for BinaryReader<'a>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more