Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Rust Programming Tutorial #36 – Modules (mod keyword)

14.3K views on YouTube

dcode 42 tutorials here

By using modules in Rust, you are able to separate your code into organised sections.

In this video I take you through how to define your own modules, look at public vs. private visibility and also how to define nested modules, which is pretty straightforward.

For your reference:
https://rustbyexample.com/mod.html

If this video helped you out and you’d like to see more, make sure to leave a like and subscribe to dcode!