pub struct ClientGCMsg<TBody>where
TBody: SteamSerializableDeserialize + IGCSerializableMessage,{
pub header: MsgGCHdr,
pub body: TBody,
pub payload: MsgBase,
pub msg_type: u32,
}Expand description
A struct-backed game coordinator message.
Fields§
§header: MsgGCHdrThe header of this message.
body: TBodyThe body of this message.
payload: MsgBaseThe raw payload that follows the body.
msg_type: u32The GC message type, taken from the body type.
Implementations§
Source§impl<TBody> ClientGCMsg<TBody>where
TBody: SteamSerializableDeserialize + IGCSerializableMessage,
impl<TBody> ClientGCMsg<TBody>where
TBody: SteamSerializableDeserialize + IGCSerializableMessage,
Sourcepub fn new(payload_reserve: usize) -> Self
pub fn new(payload_reserve: usize) -> Self
Creates a new message. The message type comes from the body type.
Sourcepub fn reply(reply_to: &dyn IClientGCMsg) -> Self
pub fn reply(reply_to: &dyn IClientGCMsg) -> Self
Creates a reply to reply_to, targeting its source job.
Sourcepub fn from_packet(msg: &dyn IPacketGCMsg) -> Result<Self, SteamError>
pub fn from_packet(msg: &dyn IPacketGCMsg) -> Result<Self, SteamError>
Parses a received GC packet.
Sourcepub fn body_mut(&mut self) -> &mut TBody
pub fn body_mut(&mut self) -> &mut TBody
The mutable body structure of this message.
Sourcepub fn header_mut(&mut self) -> &mut MsgGCHdr
pub fn header_mut(&mut self) -> &mut MsgGCHdr
The mutable header of this message.
Sourcepub fn payload_mut(&mut self) -> &mut MsgBase
pub fn payload_mut(&mut self) -> &mut MsgBase
The mutable payload buffer of this message.
Trait Implementations§
Source§impl<TBody> IClientGCMsg for ClientGCMsg<TBody>where
TBody: SteamSerializableDeserialize + IGCSerializableMessage,
impl<TBody> IClientGCMsg for ClientGCMsg<TBody>where
TBody: SteamSerializableDeserialize + IGCSerializableMessage,
Source§fn target_job_id(&self) -> JobID
fn target_job_id(&self) -> JobID
The target job id of this game coordinator message.
Source§fn set_target_job_id(&mut self, id: JobID)
fn set_target_job_id(&mut self, id: JobID)
Sets the target job id of this game coordinator message.
Source§fn source_job_id(&self) -> JobID
fn source_job_id(&self) -> JobID
The source job id of this game coordinator message.
Source§fn set_source_job_id(&mut self, id: JobID)
fn set_source_job_id(&mut self, id: JobID)
Sets the source job id of this game coordinator message.
Source§fn deserialize(&mut self, data: &[u8]) -> Result<(), SteamError>
fn deserialize(&mut self, data: &[u8]) -> Result<(), SteamError>
Fills this message in from serialized
data.Auto Trait Implementations§
impl<TBody> Freeze for ClientGCMsg<TBody>where
TBody: Freeze,
impl<TBody> RefUnwindSafe for ClientGCMsg<TBody>where
TBody: RefUnwindSafe,
impl<TBody> Send for ClientGCMsg<TBody>
impl<TBody> Sync for ClientGCMsg<TBody>
impl<TBody> Unpin for ClientGCMsg<TBody>where
TBody: Unpin,
impl<TBody> UnsafeUnpin for ClientGCMsg<TBody>where
TBody: UnsafeUnpin,
impl<TBody> UnwindSafe for ClientGCMsg<TBody>where
TBody: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more