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

  • Rust Quick Start Guide
  • Daniel Arbuckle
  • 96字
  • 2021-06-10 19:46:03

Using the item's full name directly

An item's full name consists of the module name, a :: symbol, and then the item's short name. If we have several layers of modules that we need to get through before we find the item we want, we list those modules' names in order, with a :: between each name. For example, we might refer to std::path::Path to get the Path item from the path module of the std module.

We can use the full name anywhere and be completely unambiguous as to what item we're talking about.

主站蜘蛛池模板: 东源县| 扬中市| 米脂县| 桃源县| 彭山县| 丹凤县| 汝城县| 兴国县| 蛟河市| 原平市| 赞皇县| 建宁县| 阿拉善左旗| 兰西县| 玉龙| 宜春市| 永胜县| 霸州市| 荔浦县| 海兴县| 榆树市| 左贡县| 砀山县| 龙游县| 唐山市| 皋兰县| 华容县| 博湖县| 巴青县| 晋中市| 安乡县| 连江县| 凤冈县| 长武县| 商城县| 县级市| 建水县| 崇信县| 铅山县| 泌阳县| 沅江市|