Enum airmash_protocol::KeyCode
[−]
[src]
pub enum KeyCode { Up, Down, Left, Right, Fire, Special, }
All the keys that are sent from the client to the server.
Variants
Up
Down
Left
Right
Fire
Special
Methods
impl KeyCode
[src]
pub fn from_u8(code: u8) -> Option<KeyCode>
[src]
Get the keycode associated with the
numerical value. Returns None
otherwise.
pub fn to_u8(self) -> u8
[src]
Get the numerical value associated with the keycode.
This value is the value that is actually sent over the network.
Trait Implementations
impl Debug for KeyCode
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for KeyCode
[src]
impl Clone for KeyCode
[src]
fn clone(&self) -> KeyCode
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for KeyCode
[src]
fn eq(&self, __arg_0: &KeyCode) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.