[][src]Struct naia_shared::EventPacketWriter

pub struct EventPacketWriter { /* fields omitted */ }

Handles writing of Event & Actor data into an outgoing packet

Implementations

impl EventPacketWriter[src]

pub fn new() -> EventPacketWriter[src]

Construct a new instance of EventPacketWriter, 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, out_bytes: &mut Vec<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: ActorType>(
    &mut self,
    manifest: &Manifest<T, U>,
    event: &Box<dyn Event<T>>
) -> bool
[src]

Writes an Event into the Writer's internal buffer, which will eventually be put into the outgoing packet

Auto Trait Implementations

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>,