[−][src]Module show_notes::e006
Modularize this!
- Date: November 16, 2015
- Subject: Designing APIs, and using packages ("crates") and modules
- Audio
Notes
Today, we are talking about modules, packages, and APIs in Rust. Taking a bit of a breather after some pretty hard material the last few weeks.
For reference, the Rust book section on Crates and Modules will be very helpful.
Corrigenda
I accidentally called this episode 5, instead of episode 6. Whoops.
Just before the 15:00 mark, while discussing libraries, I referred to "e006.md" when I meant to say "e006.rs". Slips of the tongue inspired by the fact that Rust (delightfully) uses Markdown for its documentation.
Links
Module Docs!
As you've no doubt noted if you've actually looked at the show notes along
the way, these are in fact module docs! Because we're inside a module marked
off by being a file, we have to use the //!
style of documentation
comments to mark them off. However, as you'll see below, if we structure or
declare modules in other ways, we will not have the same restriction.
Sponsors
- reddraggone9
- Chris Patti
Become a sponsor
Follow
- New Rustacean:
- Twitter: @newrustacean
- App.net: @newrustacean
- Email: [email protected]
- Twitter: @newrustacean
- Chris Krycho
- Twitter: @chriskrycho
- App.net: @chriskrycho
- Twitter: @chriskrycho
Modules
demonstrate_namespacing | |
demonstrate_nesting | Give an example of nested modules. |
internal_module | This is an internal module. Note that it isn't public. |
public_internal_module | This is an internal module which is public. |
Functions
demonstrate_use_inside_function | Demonstrates that modules can be |
use_modules_internal | Demonstrates the use of modules and namespaces. |