- Rust Quick Start Guide
- Daniel Arbuckle
- 131字
- 2021-06-10 19:46:03
Accessing module contents from outside
In the A module as a section of a file section, the a_second_thing function is part of the same module as a_thing, so it's automatically allowed to use the short version of the other function's name to refer to it. However, code outside of the module needs to use the full name to refer to items inside the module. There are two ways this can be done. It can either be done directly, which is a good choice if we don't expect to be referring to the item often, or we can tell Rust that we want to use the short name for an item in a different module, which is a good choice if we're going to be using that item often in our code.
推薦閱讀
- iOS Game Programming Cookbook
- 程序員面試白皮書
- GeoServer Cookbook
- 信息可視化的藝術:信息可視化在英國
- C#程序設計(慕課版)
- Python高級機器學習
- 用Flutter極速構建原生應用
- Visual C
- 大學計算機基礎(第2版)(微課版)
- 從0到1:Python數據分析
- Mastering JavaScript High Performance
- Jenkins Continuous Integration Cookbook(Second Edition)
- 基于SpringBoot實現:Java分布式中間件開發入門與實戰
- Unity 3D/2D移動開發實戰教程
- 計算機應用技能實訓教程