Enum input::Button [−][src]
pub enum Button {
Keyboard(Key),
Mouse(MouseButton),
Controller(ControllerButton),
Hat(ControllerHat),
}Models different kinds of buttons.
Variants
Keyboard(Key)A keyboard button.
Mouse(MouseButton)A mouse button.
Controller(ControllerButton)A controller button.
Hat(ControllerHat)A controller hat (d-Pad)
Trait Implementations
impl Copy for Button[src]
impl Copy for Buttonimpl Clone for Button[src]
impl Clone for Buttonfn clone(&self) -> Button[src]
fn clone(&self) -> ButtonReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl PartialEq for Button[src]
impl PartialEq for Buttonfn eq(&self, other: &Button) -> bool[src]
fn eq(&self, other: &Button) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Button) -> bool[src]
fn ne(&self, other: &Button) -> boolThis method tests for !=.
impl Eq for Button[src]
impl Eq for Buttonimpl Hash for Button[src]
impl Hash for Buttonfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
[src]Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for Button[src]
impl Debug for Buttonfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl From<Key> for Button[src]
impl From<Key> for Buttonimpl From<MouseButton> for Button[src]
impl From<MouseButton> for Buttonfn from(btn: MouseButton) -> Self[src]
fn from(btn: MouseButton) -> SelfPerforms the conversion.
impl From<ControllerButton> for Button[src]
impl From<ControllerButton> for Buttonfn from(btn: ControllerButton) -> Self[src]
fn from(btn: ControllerButton) -> SelfPerforms the conversion.