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

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. 

主站蜘蛛池模板: 桐乡市| 东丽区| 兰坪| 临洮县| 保德县| 西乌珠穆沁旗| 昂仁县| 喀喇沁旗| 霍山县| 庆云县| 尚志市| 师宗县| 南郑县| 郯城县| 涿鹿县| 巍山| 新民市| 沁阳市| 高平市| 神木县| 北宁市| 东阿县| 英山县| 柳林县| 兴安县| 西乌珠穆沁旗| 阿合奇县| 夹江县| 黄大仙区| 阜阳市| 洛南县| 云和县| 长垣县| 涪陵区| 榕江县| 贵州省| 五家渠市| 永福县| 祁门县| 许昌县| 云梦县|