Think of modules as a way to include the code from other files.
In theory it is possible to create everything in one big file. But no one does it. Splitting modules into files is a good practice to help you maintain your project.
mod test { // your code here }
When you write:
mod utils;
You are asking rust to find the code either in:
- file called utils.rs
- file mod.rs in utils folder
Knowing these 2 rules lets you define any module structure in your project.