pub struct CommandFrame {
pub client_id: ClientId,
pub command_id: CommandId,
pub entity_id: EntityId,
pub sequence: u64,
pub kind: u32,
pub priority: CommandPriority,
pub payload: Vec<u8>,
}Expand description
Client command ingress frame.
The server stamps received_at when converting this into a
CommandEnvelope; game validation and anti-cheat checks remain outside the
wire codec.
Fields§
§client_id: ClientIdClient that submitted the command.
command_id: CommandIdCommand id used for replay and audit.
entity_id: EntityIdEntity the command intends to control.
sequence: u64Client-side sequence number.
kind: u32Game-defined command kind.
priority: CommandPriorityCommand priority.
payload: Vec<u8>Opaque payload owned by the embedding game.
Implementations§
Source§impl CommandFrame
impl CommandFrame
Sourcepub fn into_envelope(self, received_at: Tick) -> CommandEnvelope
pub fn into_envelope(self, received_at: Tick) -> CommandEnvelope
Converts an ingress frame into a runtime command envelope.
Sourcepub fn from_envelope(envelope: &CommandEnvelope) -> Self
pub fn from_envelope(envelope: &CommandEnvelope) -> Self
Converts a command envelope into a wire frame, dropping server-only tick metadata.
Trait Implementations§
Source§impl Clone for CommandFrame
impl Clone for CommandFrame
Source§fn clone(&self) -> CommandFrame
fn clone(&self) -> CommandFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandFrame
impl Debug for CommandFrame
impl Eq for CommandFrame
Source§impl PartialEq for CommandFrame
impl PartialEq for CommandFrame
impl StructuralPartialEq for CommandFrame
Auto Trait Implementations§
impl Freeze for CommandFrame
impl RefUnwindSafe for CommandFrame
impl Send for CommandFrame
impl Sync for CommandFrame
impl Unpin for CommandFrame
impl UnsafeUnpin for CommandFrame
impl UnwindSafe for CommandFrame
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