Skip to main content

ClientGCMsg

Struct ClientGCMsg 

Source
pub struct ClientGCMsg<TBody>{
    pub header: MsgGCHdr,
    pub body: TBody,
    pub payload: MsgBase,
    pub msg_type: u32,
}
Expand description

A struct-backed game coordinator message.

Fields§

§header: MsgGCHdr

The header of this message.

§body: TBody

The body of this message.

§payload: MsgBase

The raw payload that follows the body.

§msg_type: u32

The GC message type, taken from the body type.

Implementations§

Source§

impl<TBody> ClientGCMsg<TBody>

Source

pub fn new(payload_reserve: usize) -> Self

Creates a new message. The message type comes from the body type.

Source

pub fn reply(reply_to: &dyn IClientGCMsg) -> Self

Creates a reply to reply_to, targeting its source job.

Source

pub fn from_packet(msg: &dyn IPacketGCMsg) -> Result<Self, SteamError>

Parses a received GC packet.

Source

pub fn body(&self) -> &TBody

The body structure of this message.

Source

pub fn body_mut(&mut self) -> &mut TBody

The mutable body structure of this message.

Source

pub fn header(&self) -> &MsgGCHdr

The header of this message.

Source

pub fn header_mut(&mut self) -> &mut MsgGCHdr

The mutable header of this message.

Source

pub fn payload(&self) -> &MsgBase

The payload buffer of this message.

Source

pub fn payload_mut(&mut self) -> &mut MsgBase

The mutable payload buffer of this message.

Trait Implementations§

Source§

impl<TBody> IClientGCMsg for ClientGCMsg<TBody>

Source§

fn is_proto(&self) -> bool

Whether this game coordinator message is protobuf backed.
Source§

fn msg_type(&self) -> u32

The network message type of this game coordinator message.
Source§

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)

Sets the target job id of this game coordinator message.
Source§

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)

Sets the source job id of this game coordinator message.
Source§

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

Serializes this message.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more