- 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.
推薦閱讀
- Learn Blockchain Programming with JavaScript
- Beginning C++ Game Programming
- Learning Selenium Testing Tools with Python
- 體驗設計原理:行為、情感和細節(jié)
- Mastering Ubuntu Server
- Windows Presentation Foundation Development Cookbook
- ASP.NET程序設計教程
- Hands-On Reinforcement Learning with Python
- 軟件項目管理實用教程
- PHP編程基礎與實踐教程
- SQL Server 2008 R2數(shù)據(jù)庫技術及應用(第3版)
- Troubleshooting Citrix XenApp?
- Angular應用程序開發(fā)指南
- Exploring SE for Android
- Python程序設計教程