Skip to main content

IPacketMsg

Trait IPacketMsg 

Source
pub trait IPacketMsg: Send + Sync {
    // Required methods
    fn is_proto(&self) -> bool;
    fn msg_type(&self) -> EMsg;
    fn target_job_id(&self) -> JobID;
    fn source_job_id(&self) -> JobID;
    fn get_data(&self) -> &[u8] ⓘ;
}
Expand description

A message received from the network.

Unlike IClientMsg, this only gives access to the header and the raw bytes.

Required Methods§

Source

fn is_proto(&self) -> bool

Whether this packet message is protobuf backed.

Source

fn msg_type(&self) -> EMsg

The network message type of this packet message.

Source

fn target_job_id(&self) -> JobID

The target job id of this packet message.

Source

fn source_job_id(&self) -> JobID

The source job id of this packet message.

Source

fn get_data(&self) -> &[u8] ⓘ

The raw bytes of the message.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§