I'm new to Rust, and learning how to structure my code. I want to create a folder structure as below:
. |-- main.rs `-- routes FOLDER |-- mod.rs |-- health_check.rs |-- main_screen FOLDER | |-- last_updated.rs | `-- mod.rs `-- secondary_screen FOLDER |-- last_updated.rs `-- mod.rs
I access main_screen/last_updated from main.rs like this:
But I can't access secondary_screen/last_updated as I am unable to specify that I want the last_updated function in the secondary_screen mod.
How would one go about accessing functions from specific mods?