pub struct ByteReader { /* private fields */ }

Implementations§

source§

impl ByteReader

source

pub fn new_from(src: &[u8]) -> Self

source

pub fn capacity(&self) -> usize

source

pub fn readable(&self) -> usize

source

pub fn mark_read_index(&mut self) -> &mut Self

source

pub fn reset_read_index(&mut self)

source

pub fn get_bytes_of_write(&self, target: &mut [u8]) -> ByteBufResult<()>

source

pub fn get_bytes_of_length(&self, length: usize) -> ByteBufResult<Vec<u8>>

source

pub fn get_u8(&self) -> ByteBufResult<u8>

source

pub fn get_i8(&self) -> ByteBufResult<i8>

source

pub fn get_u16_be(&self) -> ByteBufResult<u16>

source

pub fn get_u16_le(&self) -> ByteBufResult<u16>

source

pub fn get_i16_be(&self) -> ByteBufResult<i16>

source

pub fn get_i16_le(&self) -> ByteBufResult<i16>

source

pub fn get_u32_be(&self) -> ByteBufResult<u32>

source

pub fn get_u32_le(&self) -> ByteBufResult<u32>

source

pub fn get_i32_be(&self) -> ByteBufResult<i32>

source

pub fn get_i32_le(&self) -> ByteBufResult<i32>

source

pub fn get_u64_be(&self) -> ByteBufResult<u64>

source

pub fn get_u64_le(&self) -> ByteBufResult<u64>

source

pub fn get_i64_be(&self) -> ByteBufResult<i64>

source

pub fn get_i64_le(&self) -> ByteBufResult<i64>

source

pub fn read_bytes_of_write(&mut self, target: &mut [u8]) -> ByteBufResult<()>

source

pub fn read_bytes_of_length(&mut self, length: usize) -> ByteBufResult<Vec<u8>>

source

pub fn read_u8(&mut self) -> ByteBufResult<u8>

source

pub fn read_i8(&mut self) -> ByteBufResult<i8>

source

pub fn read_u16_be(&mut self) -> ByteBufResult<u16>

source

pub fn read_u16_le(&mut self) -> ByteBufResult<u16>

source

pub fn read_i16_be(&mut self) -> ByteBufResult<i16>

source

pub fn read_i16_le(&mut self) -> ByteBufResult<i16>

source

pub fn read_u32_be(&mut self) -> ByteBufResult<u32>

source

pub fn read_u32_le(&mut self) -> ByteBufResult<u32>

source

pub fn read_i32_be(&mut self) -> ByteBufResult<i32>

source

pub fn read_i32_le(&mut self) -> ByteBufResult<i32>

source

pub fn read_u64_be(&mut self) -> ByteBufResult<u64>

source

pub fn read_u64_le(&mut self) -> ByteBufResult<u64>

source

pub fn read_i64_be(&mut self) -> ByteBufResult<i64>

source

pub fn read_i64_le(&mut self) -> ByteBufResult<i64>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.