Skip to content

Glossary: System Design Basics in Rust

mod / pub

Also written: mod, pub, module

In Rust, `mod name;` loads `name.rs` from the same folder as a module, and `pub` makes a function in it visible outside the module. Together they let several files share code.

Where the book teaches it

Related terms

#[allow(dead_code)]