Enum tfc::Command[][src]

pub enum Command {
    KeyDown(Key),
    KeyUp(Key),
    KeyClick(Key),
    MouseMoveRel(i32i32),
    MouseMoveAbs(i32i32),
    MouseWarp(i32i32),
    MouseScroll(i32i32),
    MouseDown(MouseButton),
    MouseUp(MouseButton),
    MouseClick(MouseButton),
    Delay(u32),
}

A future invocation of a method on a Context.

Commands can be executed by calling execute_command. Each variant corresponds to a method on either the KeyboardContext or MouseContext traits.

Variants

KeyDown(Key)

Corresponds to key_down

KeyUp(Key)

Corresponds to key_up

KeyClick(Key)

Corresponds to key_click

MouseMoveRel(i32i32)

Corresponds to mouse_move_rel

MouseMoveAbs(i32i32)

Corresponds to mouse_move_abs

MouseWarp(i32i32)

Corresponds to mouse_warp

MouseScroll(i32i32)

Corresponds to mouse_scroll

MouseDown(MouseButton)

Corresponds to mouse_down

MouseUp(MouseButton)

Corresponds to mouse_up

MouseClick(MouseButton)

Corresponds to mouse_click

Delay(u32)

Creates a delay for a number of milliseconds

Implementations

impl Command[src]

pub fn execute<C>(&self, ctx: &mut C) -> Result<(), Error> where
    C: KeyboardContext + MouseContext
[src]

Execute a Command by calling the corresponding method on KeyboardContext or MouseContext.

Trait Implementations

impl Debug for Command[src]

impl Eq for Command[src]

impl PartialEq<Command> for Command[src]

impl StructuralEq for Command[src]

impl StructuralPartialEq for Command[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.