I'm writing a command line tool that lets you select custom commands by pressing a single key. In it, my structs are structured like this:
-
RawStdout
has fields and methods for aRawTerminal<std::io::Stdout>
. -
Screen
has methods that write data toRawStdout
. -
Step
groups methods fromScreen
(and other structs likeInput
,CmdRunner
, etc.) into steps, which are actually methods:show_menu
,get_input
, etc. -
My integration tests (I'm not sure if they are integration tests) test
Step
's methods:show_menu
,get_input
, etc.
Is this a reasonable structure for my structs? Any comments or suggestions?
Note: I posted this question on a reddit group, but I didn't get many replies.