Skip to main content

IClientMsg

Trait IClientMsg 

Source
pub trait IClientMsg: Send + Sync {
    // Required methods
    fn is_proto(&self) -> bool;
    fn msg_type(&self) -> EMsg;
    fn session_id(&self) -> i32;
    fn set_session_id(&mut self, id: i32);
    fn steam_id(&self) -> Option<SteamID>;
    fn set_steam_id(&mut self, id: SteamID);
    fn target_job_id(&self) -> JobID;
    fn set_target_job_id(&mut self, id: JobID);
    fn source_job_id(&self) -> JobID;
    fn set_source_job_id(&mut self, id: JobID);
    fn serialize(&self) -> Vec<u8> ⓘ;
}
Expand description

A unified interface into client messages.

Required Methods§

Source

fn is_proto(&self) -> bool

Whether this client message is protobuf backed.

Source

fn msg_type(&self) -> EMsg

The network message type of this client message.

Source

fn session_id(&self) -> i32

The session id of this client message.

Source

fn set_session_id(&mut self, id: i32)

Sets the session id of this client message.

Source

fn steam_id(&self) -> Option<SteamID>

The SteamID of this client message.

Source

fn set_steam_id(&mut self, id: SteamID)

Sets the SteamID of this client message.

Source

fn target_job_id(&self) -> JobID

The target job id of this client message.

Source

fn set_target_job_id(&mut self, id: JobID)

Sets the target job id of this client message.

Source

fn source_job_id(&self) -> JobID

The source job id of this client message.

Source

fn set_source_job_id(&mut self, id: JobID)

Sets the source job id of this client message.

Source

fn serialize(&self) -> Vec<u8> ⓘ

Serialises this client message to a byte array.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§