- 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.
推薦閱讀
- Interactive Applications Using Matplotlib
- ROS機器人編程實戰
- Flink入門與實戰
- Learning Redux
- INSTANT EaselJS Starter
- KnockoutJS Blueprints
- Azure for Architects
- Thymeleaf 3完全手冊
- Learning Google Apps Script
- Implementing DevOps with Ansible 2
- C++程序設計習題與實驗指導
- JavaScript實戰-JavaScript、jQuery、HTML5、Node.js實例大全(第2版)
- Java程序員面試筆試真題庫
- C++程序設計基礎(下)
- Java實例精通