pub enum Command {
Help,
Quit,
ShowConfig,
ToggleDtr,
ToggleRts,
SendBreak,
SetBaud(u32),
OpenMenu,
ApplyConfig(SerialConfig),
SetDtrAbs(bool),
SetRtsAbs(bool),
}Expand description
One actionable command produced by CommandKeyParser or published
onto the bus by higher layers (e.g. the TUI).
Copy because every variant carries only Copy data (currently
u32, bool, or a SerialConfig — which is Copy). Passing by
value is cheap and matches how the dispatcher consumes the value via
match.
Variants§
Help
Show the help / command-key cheatsheet.
Quit
Quit the session.
ShowConfig
Print the current SerialConfig.
ToggleDtr
Toggle the DTR output line.
ToggleRts
Toggle the RTS output line.
SendBreak
Send a line break (~250 ms by default in Issue #7’s handler).
SetBaud(u32)
Apply a new baud rate, parsed from the digits collected after b.
OpenMenu
Open the TUI configuration menu.
ApplyConfig(SerialConfig)
Atomically apply a full SerialConfig (baud + data / stop /
parity / flow) via Session::apply_config.
Introduced in v0.2 task 17 so dialog-driven “apply live” flows
do not have to decompose their target config into individual
Set* commands.
SetDtrAbs(bool)
Set the DTR output line to an absolute level (true asserted,
false deasserted). Unlike Command::ToggleDtr this does not
depend on the session’s cached line state.
SetRtsAbs(bool)
Set the RTS output line to an absolute level. See
Command::SetDtrAbs.