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

Splitting your code with crates and modules

Rust knows two types of code units: crates and modules. A crate is an external library, complete with its own Cargo.toml configuration file, dependencies, tests, and code. Modules, on the other hand, split the crate into logical parts that are only visible to the user if they import specific functions. Since the 2018 edition of Rust, the difference in using these structural encapsulations has been minimized. 

主站蜘蛛池模板: 湖口县| 简阳市| 东兰县| 汕尾市| 玉龙| 贵溪市| 蒲江县| 迁西县| 丹东市| 江山市| 德清县| 寿阳县| 阿鲁科尔沁旗| 柳州市| 彭阳县| 佛坪县| 元氏县| 阳山县| 巫溪县| 台东市| 搜索| 安岳县| 湘潭县| 偏关县| 大关县| 滕州市| 达日县| 潮安县| 南开区| 遵义县| 玉山县| 巴塘县| 宜良县| 新民市| 龙州县| 疏附县| 寿宁县| 盐池县| 章丘市| 姚安县| 内江市|