Expand description
§Command
This module exposes the Command type, which must be used when sending command to the MockComponent
from the
Component
after an Event
.
Enums§
- A command defines the “abstract” operation to perform in front of an Event. The command must be passed in the
on
method of theComponent
when callingperform
method of theMockComponent
. There is not a default conversion fromEvent -> Cmd
, but it must be implmented by the user in theComponent
in a match case. - A command result describes the output of a
Cmd
performed on a Component. It reports a “logical” change on theMockComponent
. TheComponent
then, must return a certain user definedMsg
based on the value of theCmdResult
. - Defines the 4 directions in front of a cursor movement. This may be used after a
Arrow::Up
event or for example if you want something more geeky when usingWASD
- Describes position on movement