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

User-defined types

As the name says, user-defined types are types that are defined by you. These can be composed of several types. They may either be a wrapper over a primitive type or a composition of several user defined types. They come in three forms: structures, enumerations, and unions, or more commonly known as structs, enums, and unions. They allow you to easily express you data. The naming convention for user-defined types follows the CamelCase style. Structs and enums are more powerful than C's structs and enums, while unions in Rust are very close to C and are there mainly to interact with C code bases. We'll cover structs and enums in this section, while unions are covered in Chapter 7, Advanced Concepts.

主站蜘蛛池模板: 兰坪| 都安| 大埔区| 安宁市| 松桃| 剑河县| 眉山市| 正安县| 深水埗区| 仁寿县| 义乌市| 滦平县| 宜君县| 奉新县| 沭阳县| 开鲁县| 垦利县| 崇信县| 高淳县| 广南县| 广昌县| 岢岚县| 吐鲁番市| 宜川县| 黎城县| 陆良县| 拜城县| 张家港市| 梓潼县| 丰台区| 云浮市| 榆林市| 乌审旗| 扬州市| 扎赉特旗| 仲巴县| 额敏县| 南雄市| 屯门区| 天峻县| 乌拉特前旗|