[−][src]Struct naia_shared::PacketReader
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,