pub struct PlayerAction {
pub forward_move: i8,
pub side_move: i8,
pub angle_turn: i16,
pub buttons: Buttons,
pub weapon_select: u8,
}Expand description
What a player submits each tick. Minimal, serializable, validatable.
Fields§
§forward_move: i8§side_move: i8§angle_turn: i16§weapon_select: u8Requested weapon slot (1-7), or 0 for no change.
Trait Implementations§
Source§impl Clone for PlayerAction
impl Clone for PlayerAction
Source§fn clone(&self) -> PlayerAction
fn clone(&self) -> PlayerAction
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 moreimpl Copy for PlayerAction
Source§impl Debug for PlayerAction
impl Debug for PlayerAction
Source§impl Default for PlayerAction
impl Default for PlayerAction
Source§fn default() -> PlayerAction
fn default() -> PlayerAction
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PlayerAction
impl RefUnwindSafe for PlayerAction
impl Send for PlayerAction
impl Sync for PlayerAction
impl Unpin for PlayerAction
impl UnsafeUnpin for PlayerAction
impl UnwindSafe for PlayerAction
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