- 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.
推薦閱讀
- Learning Chef
- Linux C/C++服務器開發實踐
- Scratch 3游戲與人工智能編程完全自學教程
- Unity 5.x By Example
- Gradle for Android
- QGIS By Example
- Building Serverless Applications with Python
- C語言程序設計
- 蘋果的產品設計之道:創建優秀產品、服務和用戶體驗的七個原則
- Terraform:多云、混合云環境下實現基礎設施即代碼(第2版)
- Windows Embedded CE 6.0程序設計實戰
- Android傳感器開發與智能設備案例實戰
- 遠方:兩位持續創業者的點滴思考
- 30天學通C#項目案例開發
- Instant GLEW