| Modules can be mapped to a file/directory hierarchy. Let's break down the | |
| [visibility example](/mod/visibility.html) in files: | |
| ``` | |
| $ tree . | |
| . | |
| |-- my | |
| | |-- inaccessible.rs | |
| | |-- mod.rs | |
| | `-- nested.rs | |
| `-- split.rs | |
| ``` | |
| {split.rs} | |
| {my/mod.rs} | |
| {my/nested.rs} | |
| {my/inaccessible.rs} | |
| Let's check that things still work as before: | |
| ``` | |
| $ rustc split.rs && ./split | |
| called `my::function()` | |
| called `function()` | |
| called `my::indirect_access()`, that | |
| > called `my::private_function()` | |
| called `my::nested::function()` | |
| ``` |