Skip to content

Modules practice problems in Rust

Difficulty:
Category:
Tag:

Showing 10 of 10

Status Title Difficulty
Everything is private by default: the two privacy rules Easy
Glob imports, shadowing, and ambiguity Medium
Module file layout: foo.rs, foo/mod.rs, and #[path] Medium
Modules are a tree you declare, not files you discover Easy
Paths: absolute, relative, crate::, self::, super:: Easy
pub on structs and enums behaves differently Easy
pub use re-exports and the facade pattern Hard
Restricted visibility: pub(crate), pub(super), pub(in path) Medium
Three namespaces: types, values, and macros Medium
use declarations: nested groups, as, self, and _ Medium