[][src]Trait naia_shared::Event

pub trait Event<T: EventType>: EventClone<T> {
    fn is_guaranteed(&self) -> bool;
fn write(&self, out_bytes: &mut Vec<u8>);
fn get_typed_copy(&self) -> T;
fn get_type_id(&self) -> TypeId; }

An Event is a struct of data that can be sent and recreated on the connected remote host

Required methods

fn is_guaranteed(&self) -> bool

Whether the Event is guaranteed for eventual delivery to the remote host.

fn write(&self, out_bytes: &mut Vec<u8>)

Writes the current Event into an outgoing packet's byte stream

fn get_typed_copy(&self) -> T

Gets a copy of the Event, encapsulated within an EventType enum

fn get_type_id(&self) -> TypeId

Gets the TypeId of the Event

Loading content...

Implementors

Loading content...