Paths
Paths are resolved as follows:
-
As a relative path:
fooorself::foorefers tofooin the current module,super::foorefers tofooin the parent module.
-
As an absolute path:
crate::foorefers tofooin the root of the current crate,bar::foorefers tofooin thebarcrate.
A module can bring symbols from another module into scope with use.
You will typically see something like this at the top of each module:
use std::collections::HashSet; use std::mem::transmute;