Enum input::Button [] [src]

pub enum Button {
    Keyboard(Key),
    Mouse(MouseButton),
    Controller(ControllerButton),
}

Models different kinds of buttons.

Variants

Keyboard

A keyboard button.

Mouse

A mouse button.

Controller

A controller button.

Trait Implementations

impl From<Key> for Button

fn from(key: Key) -> Self

impl From<MouseButton> for Button

fn from(btn: MouseButton) -> Self

impl From<ControllerButton> for Button

fn from(btn: ControllerButton) -> Self

Derived Implementations

impl Debug for Button

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Hash for Button

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Eq for Button

impl PartialEq for Button

fn eq(&self, __arg_0: &Button) -> bool

fn ne(&self, __arg_0: &Button) -> bool

impl Encodable for Button

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Decodable for Button

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Button, __D::Error>

impl Clone for Button

fn clone(&self) -> Button

1.0.0fn clone_from(&mut self, source: &Self)

impl Copy for Button