Enum airmash_protocol::KeyState
[−]
[src]
pub enum KeyState { Pressed, Released, }
The current state of a key.
This may be converted back to a bool
in future versions if it turns out not
to be worth it.
Variants
Pressed
Released
Methods
impl KeyState
[src]
pub fn from_bool(v: bool) -> KeyState
[src]
Get the keystate from the boolean value associated with it.
pub fn to_bool(self) -> bool
[src]
Convert the keystate back to the associated boolean value.
Trait Implementations
impl Debug for KeyState
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for KeyState
[src]
impl Clone for KeyState
[src]
fn clone(&self) -> KeyState
[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 KeyState
[src]
fn eq(&self, __arg_0: &KeyState) -> 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 !=
.