Interacting with the environment
We are at the stage in which the only thing that is holding us back from building a fully functioning command-line application is interacting with the environment. As stated in the previous section, this is an open-ended subject that spans anything from taking command-line arguments to interacting with servers and databases. As in the previous section, we will cover enough in order to get an understanding of how to structure Rust code that accepts data from the outside and processes it.
In order to explore this, we are going to get our stock application to take in command-line arguments from the user so that we can either buy or sell a stock. We will not over-complicate things by choosing whether to go short or go long, and we will not introduce storage.
However, by the end of this section, we will be equipped to approach building code that scales and accepts data from the outside world. With this, further reading on crates that connect to databases...