I am not sure on when to use mod or pub mod. According to the rust book (Modules Cheat Sheet),
code within a module is private from its parent modules by default. But in my basic ray tracer project, I declared the module with just mod camera, mode ray, etc. And each of the module is defined with pub struct and their corresponding implementations contains pub method.
Where is the scenario pub mod makes a difference ? Small snippet to example code would help to understand the issue .
Well, if I annotate that statement for my example, "Code (like mod bar) within a module (mod parent) is private from its parent modules (outside of mod parent) by default." It doesn't help that I called it parent in this case, but I hope you see what it means.