I read the mod document and found that I must add mod.rs in each folder, for example I have to define mod like this in my project structure:
src/
models/
login.rs
mod.rs
routes/
login_route.rs
mod.rs
services/
login_service.rs
mod.rs
main.rs
and use it like this in main.rs:
mod models;
mod routes;
mod services;
Why do it like that? Why design like that? If the project increase, the project has many mod.rs file just for expose mod? It is a good practice? I did not understand. What is the advantage about do it like this way? If we just do it like this way:
crate::models::login;
it is so clear and easy to understand.