[−][src]Struct naia_shared::PacketWriter
Handles writing of Event & Entity data into an outgoing packet
Fields
entity_working_bytes: Vec<u8>
bytes representing outgoing Entity messages / updates
entity_message_count: u8
number of Entity messages to be written
Implementations
impl PacketWriter
[src]
pub fn new() -> PacketWriter
[src]
Construct a new instance of PacketReader
, the given buffer
will be
used to read information from.
pub fn has_bytes(&self) -> bool
[src]
Returns whether the writer has bytes to write into the outgoing packet
pub fn get_bytes(&mut self) -> Box<[u8]>
[src]
Gets the bytes to write into an outgoing packet
pub fn bytes_number(&self) -> usize
[src]
Get the number of bytes which is ready to be written into an outgoing packet
pub fn write_event<T: EventType, U: EntityType>(
&mut self,
manifest: &Manifest<T, U>,
event: &Box<dyn Event<T>>
) -> bool
[src]
&mut self,
manifest: &Manifest<T, U>,
event: &Box<dyn Event<T>>
) -> bool
Writes an Event into the Writer's internal buffer, which will eventually be put into the outgoing packet
Auto Trait Implementations
impl RefUnwindSafe for PacketWriter
impl Send for PacketWriter
impl Sync for PacketWriter
impl Unpin for PacketWriter
impl UnwindSafe for PacketWriter
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>,