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

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.

主站蜘蛛池模板: 海安县| 绍兴市| 罗江县| 虹口区| 宁南县| 霍林郭勒市| 曲阜市| 滕州市| 临夏市| 亳州市| 分宜县| 上林县| 临猗县| 岳阳市| 临朐县| 桃江县| 天祝| 龙南县| 潞城市| 广水市| 台南市| 凌海市| 榆树市| 轮台县| 平定县| 洱源县| 泽普县| 浦北县| 勃利县| 哈密市| 菏泽市| 景宁| 林芝县| 凉山| 阿坝| 都江堰市| 莱西市| 东平县| 信阳市| 武夷山市| 克山县|