I'm discovering rust modules for the first time and it is not intuitive to me because I'm expecting some sort of declaration at the top of a file to say what module it is.
In Rust however, it seems that the only way to define a "module" is to include a file as a module from another file (parent file) following the naming convention of <module>.rs | /<module>/mod.rs but the module file itself doesn't have any decorators or attributes to tell the reader, "hey I'm a module".
In fact, if I wrap the module itself in a mod <module> { ... } then my namespace will contain two instances of the module, eg crate::<module>::<module>::...
So whilst I understand the mechanics around this portion of the module system, I'm finding it different to what I'm used to where module declarations are part of the module file itself.
Is my understanding correct?
Is there somewhere that talks about this kind of design?