Skip to content

Modules practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 10 of 10

Title Difficulty
Build a module tree and inspect its paths Easy
Expose a small module API Easy
Model public item paths and re-exports Hard
Module file layout: foo.rs, foo/mod.rs, and #[path] Medium
Paths: absolute, relative, crate::, self::, super:: Easy
Protect rectangle invariants with private fields Easy
Resolve names in a simplified import model Medium
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