[][src]Struct naia_shared::PacketReader

pub struct PacketReader<'s> { /* fields omitted */ }

Contains an underlying byte payload, and provides a Cursor into that payload

Implementations

impl<'s> PacketReader<'s>[src]

pub fn new(buffer: &'s [u8]) -> PacketReader<'s>[src]

Construct a new instance of PacketReader, the given buffer will be used to read information from.

pub fn has_more(&self) -> bool[src]

Returns whether there are still more bytes to be read from the payload

pub fn read_u8(&mut self) -> u8[src]

Read a single byte from the payload

pub fn get_cursor(&mut self) -> &mut Cursor<&'s [u8]>[src]

Get a reference to the Cursor

pub fn get_buffer(&self) -> &'s [u8][src]

Get a reference to the underlying payload byte buffer

Auto Trait Implementations

impl<'s> RefUnwindSafe for PacketReader<'s>

impl<'s> Send for PacketReader<'s>

impl<'s> Sync for PacketReader<'s>

impl<'s> Unpin for PacketReader<'s>

impl<'s> UnwindSafe for PacketReader<'s>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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<V, T> VZip<V> for T where
    V: MultiLane<T>,