pub enum Token {
Text(String),
Key(Key, Direction),
Raw(u16, Direction),
Button(Button, Direction),
MoveMouse(i32, i32, Coordinate),
Scroll(i32, Axis),
Location(i32, i32),
MainDisplay(i32, i32),
}Variants§
Text(String)
Call the Keyboard::text fn with the string as text
Key(Key, Direction)
Call the Keyboard::key fn with the given key and direction
Raw(u16, Direction)
Call the Keyboard::raw fn with the given keycode and direction
Button(Button, Direction)
Call the Mouse::button fn with the given mouse button and direction
MoveMouse(i32, i32, Coordinate)
Call the Mouse::move_mouse fn. The first i32 is the value to move on
the x-axis and the second i32 is the value to move on the y-axis. The
coordinate defines if the given coordinates are absolute of relative to
the current position of the mouse.
Scroll(i32, Axis)
Call the Mouse::scroll fn.
Location(i32, i32)
Call the Mouse::location fn and compare the return values with
the values of this enum. Log an error if they are not equal.
This variant contains the EXPECTED location of the mouse
MainDisplay(i32, i32)
Call the Mouse::main_display fn and compare the return values with
the values of this enum. Log an error if they are not equal.
This variant contains the EXPECTED size of the main display
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Token
impl<'de> Deserialize<'de> for Token
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.