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

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.

主站蜘蛛池模板: 横峰县| 清新县| 美姑县| 马尔康县| 民权县| 左权县| 永平县| 柘荣县| 嘉黎县| 通道| 宁乡县| 长白| 萍乡市| 广水市| 崇文区| 沙洋县| 白朗县| 福贡县| 扎囊县| 崇信县| 昌乐县| 修文县| 吴川市| 平和县| 资兴市| 江门市| 蕉岭县| 钟山县| 青海省| 尼玛县| 肥城市| 蕲春县| 文山县| 拜城县| 德格县| 东海县| 沿河| 项城市| 闻喜县| 綦江县| 五台县|