[][src]Struct dragnit::ByteBuffer

pub struct ByteBuffer<'a> { /* fields omitted */ }

Methods

impl<'a> ByteBuffer<'a>[src]

pub fn new(data: &[u8]) -> ByteBuffer[src]

pub fn data(&self) -> &'a [u8][src]

pub fn index(&self) -> usize[src]

pub fn read_bool(&mut self) -> Result<bool, ()>[src]

pub fn read_byte(&mut self) -> Result<u8, ()>[src]

pub fn read_bytes(&mut self, len: usize) -> Result<&'a [u8], ()>[src]

pub fn read_var_int(&mut self) -> Result<i32, ()>[src]

pub fn read_var_uint(&mut self) -> Result<u32, ()>[src]

pub fn read_var_float(&mut self) -> Result<f32, ()>[src]

pub fn read_string(&mut self) -> Result<Cow<'a, str>, ()>[src]

Auto Trait Implementations

impl<'a> Send for ByteBuffer<'a>

impl<'a> Sync for ByteBuffer<'a>

impl<'a> Unpin for ByteBuffer<'a>

impl<'a> UnwindSafe for ByteBuffer<'a>

impl<'a> RefUnwindSafe for ByteBuffer<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]