Przewodnik po Języku Rust Spis Treści

Creating Modules

When we think of code, we usually imagine a hierarchy of files organized in directories. Rust lets you create modules closely related to your file structure.

There are two ways in Rust to declare a module. For example, a module foo can be represented as:

Mascot Ferris