EN | DE

Stage 10.8: Module Hierarchy

A module can depend on another one. In order to establish a relationship between a module and its sub-module, you must write in the parent module:
mod foo;

The declaration above will look for a file named foo.rs or foo/mod.rs and will insert its contents inside a module named foo under this scope.

Tags: #modules

Further information:

Share on Facebook Share on Twitter Share on Reddit Save on Pocket Share on LinkedIn Share via email
Rust mascot Ferris