Struct raknet::BitStreamRead
source · pub struct BitStreamRead<'a> { /* private fields */ }
Implementations§
source§impl<'a> BitStreamRead<'a>
impl<'a> BitStreamRead<'a>
sourcepub fn with_size(data: &'a [u8], number_of_bits_used: BitSize) -> Self
pub fn with_size(data: &'a [u8], number_of_bits_used: BitSize) -> Self
Create a new instance with a specified number of bits
pub fn ignore_bits(&mut self, number_of_bits: BitSize) -> Result<()>
pub const fn get_number_of_unread_bits(&self) -> BitSize
pub fn read_bit(&mut self) -> bool
pub fn read<T: ReadSafe>(&mut self) -> Result<T>
pub fn read_bool(&mut self) -> Result<bool>
pub fn read_bits<T: Bits>(&mut self) -> Result<T>
sourcepub fn read_compressed<T: ReadSafe>(&mut self) -> Result<T>
pub fn read_compressed<T: ReadSafe>(&mut self) -> Result<T>
Public version of ReadCompressed
pub fn read_aligned_bytes( &mut self, number_of_bytes_to_read: usize ) -> Result<&'a [u8]>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for BitStreamRead<'a>
impl<'a> Send for BitStreamRead<'a>
impl<'a> Sync for BitStreamRead<'a>
impl<'a> Unpin for BitStreamRead<'a>
impl<'a> UnwindSafe for BitStreamRead<'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