pub struct ByteStream<'a> { /* private fields */ }
Implementations§
Source§impl<'a> ByteStream<'a>
impl<'a> ByteStream<'a>
pub fn new(stream: &'a [u8]) -> Self
pub fn read_u8(&mut self) -> Result<u8>
pub fn read_u16(&mut self) -> Result<u16>
pub fn read_u32(&mut self) -> Result<u32>
pub fn read_i16(&mut self) -> Result<i16>
pub fn read_i32(&mut self) -> Result<i32>
pub fn read_f32(&mut self) -> Result<f32>
pub fn read_string(&mut self, size: usize) -> Result<String>
pub fn read(&mut self, size: usize) -> Result<Vec<u8>>
pub fn get_size(&self) -> u64
pub fn get_position(&self) -> u64
pub fn set_position(&mut self, position: u64)
pub fn skip(&mut self, size: u64) -> Result<u64>
Auto Trait Implementations§
impl<'a> Freeze for ByteStream<'a>
impl<'a> RefUnwindSafe for ByteStream<'a>
impl<'a> Send for ByteStream<'a>
impl<'a> Sync for ByteStream<'a>
impl<'a> Unpin for ByteStream<'a>
impl<'a> UnwindSafe for ByteStream<'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