Skip to main content

Module command

Module command 

Source
Expand description

Commands for side effects.

Commands represent IO operations that produce messages. They are the only way to perform side effects in the Elm Architecture.

§Sync vs Async Commands

The crate supports both synchronous and asynchronous commands:

  • Cmd - Synchronous commands that run on a blocking thread pool
  • AsyncCmd - Asynchronous commands that run on the tokio runtime (requires async feature)

Both types are automatically handled by the program’s command executor.

Structs§

Cmd
A command that produces a message when executed.

Functions§

batch
Batch multiple commands to run concurrently.
every
Command that ticks in sync with the system clock.
printf
Print a formatted line above the program’s TUI output.
println
Print a line above the program’s TUI output.
quit
Command that signals the program to quit.
sequence
Sequence commands to run one at a time, in order.
set_window_title
Command to set the terminal window title.
tick
Command that ticks after a duration.
window_size
Command to query the current window size.