官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 桦川县| 南投市| 北票市| 子洲县| 南华县| 固镇县| 民勤县| 鄱阳县| 同德县| 兰坪| 文安县| 海阳市| 筠连县| 定南县| 水富县| 汉阴县| 黔东| 镇赉县| 广昌县| 丰宁| 科技| 靖江市| 延津县| 新乡市| 马尔康县| 灵川县| 株洲市| 荥阳市| 通河县| 柳河县| 盘山县| 喀喇沁旗| 响水县| 和林格尔县| 花莲市| 涪陵区| 玉山县| 沁源县| 合江县| 东至县| 桐乡市|