Module tuirealm::command

source ·
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 the Component when calling perform method of the MockComponent. There is not a default conversion from Event -> Cmd, but it must be implmented by the user in the Component in a match case.
  • A command result describes the output of a Cmd performed on a Component. It reports a “logical” change on the MockComponent. The Component then, must return a certain user defined Msg based on the value of the CmdResult.
  • 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 using WASD
  • Describes position on movement