pub struct ByteBuffer<'a> { /* private fields */ }Implementations§
Source§impl<'a> ByteBuffer<'a>
impl<'a> ByteBuffer<'a>
pub fn new(data: &[u8]) -> ByteBuffer<'_>
pub fn data(&self) -> &'a [u8] ⓘ
pub fn index(&self) -> usize
pub fn read_bool(&mut self) -> Result<bool, ()>
pub fn read_byte(&mut self) -> Result<u8, ()>
pub fn read_bytes(&mut self, len: usize) -> Result<&'a [u8], ()>
pub fn read_var_int(&mut self) -> Result<i32, ()>
pub fn read_var_uint(&mut self) -> Result<u32, ()>
pub fn read_var_float(&mut self) -> Result<f32, ()>
pub fn read_string(&mut self) -> Result<Cow<'a, str>, ()>
Auto Trait Implementations§
impl<'a> Freeze for ByteBuffer<'a>
impl<'a> RefUnwindSafe for ByteBuffer<'a>
impl<'a> Send for ByteBuffer<'a>
impl<'a> Sync for ByteBuffer<'a>
impl<'a> Unpin for ByteBuffer<'a>
impl<'a> UnwindSafe for ByteBuffer<'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