- Mastering Rust
- Rahul Sharma Vesa Kaihlavirta
- 124字
- 2021-07-02 13:35:15
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.
推薦閱讀
- INSTANT Mock Testing with PowerMock
- Learning Python Web Penetration Testing
- jQuery EasyUI網站開發實戰
- Jupyter數據科學實戰
- 組態軟件技術與應用
- Unity&VR游戲美術設計實戰
- 小型編譯器設計實踐
- Red Hat Enterprise Linux Troubleshooting Guide
- Beginning C++ Game Programming
- Hadoop 2.X HDFS源碼剖析
- Mastering HTML5 Forms
- Applied Deep Learning with Python
- Java EE 程序設計
- Kotlin核心編程
- Learning Network Programming with Java