[][src]Enum human::Input

#[non_exhaustive]pub enum Input {
    Text(char),
    Key(ModKeybool),
    Click(ModBtnbool),
    PointerLeave,
    ScrollX(Modf32),
    ScrollY(Modf32),
    PointerX(f32),
    PointerY(f32),
    Touch(bool),
    Pinch(bool),
    PinchW(f32),
    PinchH(f32),
    PinchZ(f32),
    Controller(Controller),
}

Input event from any human interface device

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text(char)

User inputted text.

Key(ModKeybool)

A key on the keyboard was pressed or released.

Click(ModBtnbool)

Pointer button was pressed or released (Left click, Tap).

PointerLeave

The pointer has left the window.

ScrollX(Modf32)

Request to shift the viewport in the X dimension (relative coordinates).

ScrollY(Modf32)

Request to shift the viewport in the Y dimension (relative coordinates).

PointerX(f32)

The pointer was moved in the X dimension (absolute coordinates).

PointerY(f32)

The pointer was moved in the Y dimension (absolute coordinates).

Touch(bool)

Touchscreen was touched with one finger.

Pinch(bool)

Touchscreen was touched with two fingers.

PinchW(f32)

Pinch width has changed.

PinchH(f32)

Pinch height has changed.

PinchZ(f32)

Rotation Amount

Controller(Controller)

New controller plugged in.

Implementations

impl Input[src]

pub fn listener() -> impl Future<Output = Input>[src]

Get a future that returns input events. You may only call this once, because multiple threads reading the same input wouldn't logically work.

Trait Implementations

impl Debug for Input[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.